1#![doc = include_str!("../README.md")]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3
4#[cfg(not(any(feature = "di", feature = "async")))]
6pub type Ref<T> = std::rc::Rc<T>;
7
8#[cfg(all(not(feature = "di"), feature = "async"))]
10pub type Ref<T> = std::sync::Arc<T>;
11
12#[cfg(feature = "di")]
14pub type Ref<T> = di::Ref<T>;
15
16#[cfg(not(feature = "async"))]
22pub trait Value: Sized {}
23
24#[cfg(not(feature = "async"))]
25impl<T> Value for T {}
26
27#[cfg(feature = "async")]
28pub trait Value: Sized + Send + Sync {}
29
30#[cfg(feature = "async")]
31impl<T: Send + Sync> Value for T {}
32
33mod cache;
34mod configure;
35mod factory;
36mod manager;
37mod monitor;
38mod snapshot;
39mod token;
40
41pub mod validation;
43
44#[cfg(any(feature = "di", feature = "cfg"))]
46pub mod prelude;
47
48pub use cache::Cache;
49pub use configure::{Configure, PostConfigure};
50pub use factory::{DefaultFactory, Factory};
51pub use manager::Manager;
52pub use monitor::{DefaultMonitor, Monitor, Subscription};
53pub use snapshot::Snapshot;
54pub use token::ChangeTokenSource;