collection_tools/
lib.rs

1#![ cfg_attr( feature = "no_std", no_std ) ]
2#![ doc( html_logo_url = "https://raw.githubusercontent.com/Wandalen/wTools/master/asset/img/logo_v3_trans_square.png" ) ]
3#![ doc(
4  html_favicon_url = "https://raw.githubusercontent.com/Wandalen/wTools/alpha/asset/img/logo_v3_trans_square_icon_small_v2.ico"
5) ]
6#![ doc( html_root_url = "https://docs.rs/collection_tools/latest/collection_tools/" ) ]
7#![ cfg_attr( doc, doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "readme.md" ) ) ) ]
8#![ cfg_attr( not( doc ), doc = "Collection tools for Rust" ) ]
9#![ allow( clippy::mod_module_files ) ]
10// #[ cfg( feature = "enabled" ) ]
11// #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
12// extern crate alloc;
13
14/// Module containing all collection macros
15#[ cfg( feature = "enabled" ) ]
16#[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
17pub mod collection;
18
19// #[ cfg( feature = "enabled" ) ]
20// #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
21// pub use collection :: *;
22
23/// Namespace with dependencies.
24#[ cfg( feature = "enabled" ) ]
25pub mod dependency
26{
27  #[ cfg( feature = "use_alloc" ) ]
28  pub use ::hashbrown;
29}
30
31#[ doc( inline ) ]
32#[ allow( unused_imports ) ]
33#[ cfg( feature = "enabled" ) ]
34#[ allow( clippy::pub_use ) ]
35pub use own::*;
36
37/// Own namespace of the module.
38#[ cfg( feature = "enabled" ) ]
39#[ allow( unused_imports ) ]
40pub mod own
41{
42  // use super::*;
43
44  #[ doc( inline ) ]
45  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
46  pub use super::orphan::*;
47
48  #[ doc( inline ) ]
49  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
50  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
51  pub use super::collection::own::*;
52}
53
54/// Parented namespace of the module.
55#[ cfg( feature = "enabled" ) ]
56#[ allow( unused_imports ) ]
57pub mod orphan
58{
59
60  use super::*;
61  #[ doc( inline ) ]
62  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
63  pub use exposed::*;
64
65  #[ doc( inline ) ]
66  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
67  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
68  pub use collection::orphan::*;
69}
70
71/// Exposed namespace of the module.
72#[ cfg( feature = "enabled" ) ]
73#[ allow( unused_imports ) ]
74pub mod exposed
75{
76
77  use super::*;
78
79  #[ doc( inline ) ]
80  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
81  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
82  pub use prelude::*;
83
84  #[ doc( inline ) ]
85  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
86  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
87  pub use collection::exposed::*;
88}
89
90/// Prelude to use essentials: `use my_module::prelude::*`.
91#[ cfg( feature = "enabled" ) ]
92#[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
93#[ allow( unused_imports ) ]
94pub mod prelude
95{
96  use super::collection;
97
98  #[ doc( inline ) ]
99  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
100  pub use collection::prelude::*;
101}
102
103/// Empty prelude for no_std configurations
104#[ cfg( feature = "enabled" ) ]
105#[ cfg( all( feature = "no_std", not( feature = "use_alloc" ) ) ) ]
106#[ allow( unused_imports ) ]
107pub mod prelude
108{
109}
110
111// pub use own ::collection as xxx;
112// pub use hmap as xxx;
113// pub use own ::HashMap as xxx;
114// pub fn x()
115// {
116//   let x: HashMap< usize, usize > = hmap!{};
117// }