Skip to main content

sword_core/
lib.rs

1mod application;
2mod config;
3mod controllers;
4mod injectables;
5mod interceptor;
6mod layer_stack;
7mod module;
8mod shutdown;
9mod state;
10
11pub mod error {
12    #[macro_use]
13    mod macros;
14    mod diagnostic;
15
16    pub use diagnostic::{StartupDiagnostic, emit};
17}
18
19pub use application::*;
20pub use config::*;
21pub use controllers::*;
22pub use injectables::*;
23pub use interceptor::*;
24pub use layer_stack::*;
25pub use module::*;
26pub use shutdown::*;
27pub use state::*;
28
29pub(crate) type RwMap<K, V> = parking_lot::RwLock<std::collections::HashMap<K, V>>;
30
31#[macro_export]
32macro_rules! inventory_submit {
33    ( [ $( $registrar:expr ),* $(,)? ] ) => {
34        $(
35            const _: () = {
36                inventory::submit! {
37                    $registrar
38                }
39            };
40        )*
41    };
42}