pub trait SingletonCtorDeps<T, Deps>:
FnOnce(Deps) -> T
+ Send
+ Sync
+ 'static {
// Required method
fn call(
self,
deps: Deps,
_: SealToken,
) -> Result<T, Box<dyn Error + Send + Sync>>;
}
Expand description
A generic constructor for singletons with dependencies.
This is a marker trait to identify all valid constructors usable by singletons. It’s not implementable by other crates.
A blanket implementation for FnOnce(Deps) -> T
is provided.