Skip to main content

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
11/// Module containing all collection macros
12#[ cfg( feature = "enabled" ) ]
13#[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
14pub mod collection;
15
16/// Namespace with dependencies.
17#[ cfg( feature = "enabled" ) ]
18pub mod dependency
19{
20  #[ cfg( feature = "use_alloc" ) ]
21  pub use ::hashbrown;
22}
23
24#[ doc( inline ) ]
25#[ allow( unused_imports ) ]
26#[ cfg( feature = "enabled" ) ]
27#[ allow( clippy::pub_use ) ]
28pub use own::*;
29
30/// Own namespace of the module.
31#[ cfg( feature = "enabled" ) ]
32#[ allow( unused_imports ) ]
33pub mod own
34{
35  // use super::*;
36
37  #[ doc( inline ) ]
38  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
39  pub use super::orphan::*;
40
41  #[ doc( inline ) ]
42  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
43  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
44  pub use super::collection::own::*;
45}
46
47/// Parented namespace of the module.
48#[ cfg( feature = "enabled" ) ]
49#[ allow( unused_imports ) ]
50pub mod orphan
51{
52
53  use super::*;
54  #[ doc( inline ) ]
55  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
56  pub use exposed::*;
57
58  #[ doc( inline ) ]
59  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
60  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
61  pub use collection::orphan::*;
62}
63
64/// Exposed namespace of the module.
65#[ cfg( feature = "enabled" ) ]
66#[ allow( unused_imports ) ]
67pub mod exposed
68{
69
70  use super::*;
71
72  #[ doc( inline ) ]
73  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
74  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
75  pub use prelude::*;
76
77  #[ doc( inline ) ]
78  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
79  #[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
80  pub use collection::exposed::*;
81}
82
83/// Prelude to use essentials: `use my_module::prelude::*`.
84#[ cfg( feature = "enabled" ) ]
85#[ cfg( any( feature = "use_alloc", not( feature = "no_std" ) ) ) ]
86#[ allow( unused_imports ) ]
87pub mod prelude
88{
89  use super::collection;
90
91  #[ doc( inline ) ]
92  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
93  pub use collection::prelude::*;
94}
95
96/// Empty prelude for no_std configurations
97#[ cfg( feature = "enabled" ) ]
98#[ cfg( all( feature = "no_std", not( feature = "use_alloc" ) ) ) ]
99#[ allow( unused_imports ) ]
100pub mod prelude
101{
102}