error_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( html_favicon_url = "https://raw.githubusercontent.com/Wandalen/wTools/alpha/asset/img/logo_v3_trans_square_icon_small_v2.ico" ) ]
4#![ doc( html_root_url = "https://docs.rs/error_tools/latest/error_tools/" ) ]
5#![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "Readme.md" ) ) ]
6#![ allow( clippy::mod_module_files ) ]
7
8/// Alias for `std::error::BasicError`.
9#[ allow( clippy::pub_use ) ]
10#[ cfg( feature = "enabled" ) ]
11#[ cfg( not( feature = "no_std" ) ) ]
12pub mod error;
13
14/// Namespace with dependencies.
15#[ cfg( feature = "enabled" ) ]
16pub mod dependency
17{
18
19  #[ doc( inline ) ]
20  #[ cfg( feature = "error_typed" ) ]
21  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
22  pub use ::thiserror;
23
24  #[ doc( inline ) ]
25  #[ cfg( feature = "error_untyped" ) ]
26  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
27  pub use ::anyhow;
28
29}
30
31#[ cfg( feature = "enabled" ) ]
32#[ cfg( not( feature = "no_std" ) ) ]
33#[ doc( inline ) ]
34#[ allow( unused_imports ) ]
35#[ allow( clippy::pub_use ) ]
36pub use own::*;
37
38/// Own namespace of the module.
39#[ cfg( feature = "enabled" ) ]
40#[ cfg( not( feature = "no_std" ) ) ]
41#[ allow( unused_imports ) ]
42pub mod own
43{
44  use super::*;
45
46  #[ doc( inline ) ]
47  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
48  pub use error::own::*;
49
50}
51
52/// Shared with parent namespace of the module
53#[ cfg( feature = "enabled" ) ]
54#[ cfg( not( feature = "no_std" ) ) ]
55#[ allow( unused_imports ) ]
56pub mod orphan
57{
58  #[ allow( clippy::wildcard_imports ) ]
59  use super::*;
60
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  pub use error::orphan::*;
68
69}
70
71/// Exposed namespace of the module.
72#[ cfg( feature = "enabled" ) ]
73#[ cfg( not( feature = "no_std" ) ) ]
74#[ allow( unused_imports ) ]
75pub mod exposed
76{
77  #[ allow( clippy::wildcard_imports ) ]
78  use super::*;
79
80  #[ doc( inline ) ]
81  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
82  pub use prelude::*;
83
84  #[ doc( inline ) ]
85  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
86  pub use error::exposed::*;
87
88}
89
90/// Prelude to use essentials: `use my_module::prelude::*`.
91#[ cfg( feature = "enabled" ) ]
92#[ cfg( not( feature = "no_std" ) ) ]
93#[ allow( unused_imports ) ]
94pub mod prelude
95{
96  use super::error;
97
98  #[ doc( inline ) ]
99  #[ allow( clippy::useless_attribute, clippy::pub_use ) ]
100  pub use error::prelude::*;
101
102}