pub trait ProvideMutWith<'me, T, C> {
// Required method
fn provide_mut_with(&'me mut self, context: C) -> T;
}Expand description
Type of provider which provides dependency by unique reference, but with additional context provided by the caller.
This trait is very similar to ProvideMut trait.
However, this trait allows to retrieve additional context provided by the caller,
so it is possible to define many ways of how dependency can be provided.
See crate documentation for more.
Required Methods§
Sourcefn provide_mut_with(&'me mut self, context: C) -> T
fn provide_mut_with(&'me mut self, context: C) -> T
Provides dependency by unique reference with additional context provided by the caller.
§Examples
use provide::with::ProvideMutWith;
todo!()Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".