pub trait Provide {
type Output: Inject + ?Sized;
// Required methods
fn provide(&self, container: &Container) -> Result<Arc<Self::Output>>;
fn dependencies(&self) -> &'static [&'static str];
}
Expand description
A trait to manage the construction of an injectable trait or struct.
Required Associated Types§
Required Methods§
sourcefn provide(&self, container: &Container) -> Result<Arc<Self::Output>>
fn provide(&self, container: &Container) -> Result<Arc<Self::Output>>
Only intended to be used internally
sourcefn dependencies(&self) -> &'static [&'static str]
fn dependencies(&self) -> &'static [&'static str]
Available on crate feature
debug
only.Return list of dependencies
Implementations on Foreign Types§
source§impl<T> Provide for (&'static [&'static str], dyn Fn(&Container) -> Result<Arc<T>>)
Available on crate feature debug
only.
impl<T> Provide for (&'static [&'static str], dyn Fn(&Container) -> Result<Arc<T>>)
Available on crate feature
debug
only.