Skip to content

Commit

Permalink
Merge pull request Wandalen#1126 from Wandalen/derive_tools_reflect
Browse files Browse the repository at this point in the history
Derive tools reflect
  • Loading branch information
Wandalen authored Feb 18, 2024
2 parents f1e9cac + 52a5e23 commit 80d70c9
Show file tree
Hide file tree
Showing 28 changed files with 1,197 additions and 135 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
resolver = "2"
members = [
"module/alias/*",
"module/blank/*",
# "module/blank/*",
"module/core/*",
"module/move/*",
# "module/step/*",
Expand Down
102 changes: 45 additions & 57 deletions Readme.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions module/core/derive_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ default = [
"derive_error",
"derive_from",
"derive_inner_from",
"derive_reflect",

"derive_index",
"derive_index_mut",
"derive_into",
Expand Down Expand Up @@ -85,6 +87,9 @@ full = [
"derive_deref_mut",
"derive_error",
"derive_from",
"derive_inner_from",
"derive_reflect",

"derive_index",
"derive_index_mut",
"derive_into",
Expand Down Expand Up @@ -137,6 +142,7 @@ derive_error = [ "derive_more", "derive_more/error" ]
# derive_from = [ "derive_tools_meta/derive_from" ]
derive_from = [ "derive_tools_meta/derive_from" ]
derive_inner_from = [ "derive_tools_meta/derive_inner_from" ]
derive_reflect = [ "derive_tools_meta/derive_reflect" ]

derive_index = [ "derive_more", "derive_more/index" ]
derive_index_mut = [ "derive_more", "derive_more/index_mut" ]
Expand Down
7 changes: 4 additions & 3 deletions module/core/derive_tools/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ fn main()
feature = "derive_deref_mut",
feature = "derive_from",
feature = "derive_inner_from",
feature = "derive_variadic_from"
feature = "derive_variadic_from",
feature = "derive_reflect"
)
},
any_derive :
Expand All @@ -35,9 +36,9 @@ fn main()
feature = "derive_deref_mut",
feature = "derive_from",
feature = "derive_inner_from",
feature = "derive_variadic_from"
feature = "derive_variadic_from",
feature = "derive_reflect"
)
},
}
}

37 changes: 22 additions & 15 deletions module/core/derive_tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#![ doc( html_logo_url = "https://raw.githubusercontent.com/Wandalen/wTools/master/asset/img/logo_v3_trans_square.png" ) ]
#![ doc( html_favicon_url = "https://raw.githubusercontent.com/Wandalen/wTools/alpha/asset/img/logo_v3_trans_square_icon_small_v2.ico" ) ]
#![ doc( html_root_url = "https://docs.rs/derive_tools/latest/derive_tools/" ) ]
// #![ deny( rust_2018_idioms ) ]
// #![ deny( missing_debug_implementations ) ]
// #![ deny( missing_docs ) ]

// #![ feature( trait_alias ) ]
// #![ feature( type_name_of_val ) ]
Expand All @@ -18,6 +15,9 @@
#[ cfg( feature = "enabled" ) ]
pub mod wtools;

#[ cfg( feature = "derive_reflect" ) ]
pub mod reflect;

// use derive_tools_meta::Deref;
// use derive_tools_meta::VariadicFrom;

Expand All @@ -37,9 +37,13 @@ pub mod dependency
pub use ::clone_dyn::dependency::*;
#[ cfg( any_derive ) ]
pub use ::derive_tools_meta;

}

#[ cfg( feature = "enabled" ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use protected::*;

/// Protected namespace of the module.
#[ cfg( feature = "enabled" ) ]
pub mod protected
Expand All @@ -54,26 +58,19 @@ pub mod protected
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::wtools::orphan::*;
#[ cfg( feature = "derive_reflect" ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::reflect::orphan::*;
}

#[ cfg( feature = "enabled" ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use protected::*;

#[ cfg( feature = "enabled" ) ]
// #[ doc( inline ) ]
#[ allow( unused_imports ) ]
// pub use exposed::*;

/// Orphan namespace of the module.
#[ cfg( feature = "enabled" ) ]
pub mod orphan
{
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::exposed::*;

}

/// Exposed namespace of the module.
Expand Down Expand Up @@ -114,6 +111,11 @@ pub mod exposed
#[ allow( unused_imports ) ]
pub use super::wtools::exposed::*;

#[ cfg( feature = "derive_reflect" ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::reflect::exposed::*;

// #[ cfg( any_derive ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
Expand All @@ -138,6 +140,11 @@ pub mod prelude
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use ::clone_dyn::clone_dyn;
#[ cfg( feature = "derive_reflect" ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::reflect::prelude::*;

#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::wtools::prelude::*;
Expand Down
Loading

0 comments on commit 80d70c9

Please sign in to comment.