[−][src]Struct inject::Container
Implementations
impl Container
[src]
pub fn new() -> Container
[src]
pub fn install<T: Inject, P: 'static + Provider<ProvidedType = T>>(
&mut self,
provider: P
)
[src]
&mut self,
provider: P
)
pub fn install_ref<T: Inject, P: 'static + RefProvider<ProvidedRef = T>>(
&mut self,
provider: P
)
[src]
&mut self,
provider: P
)
pub fn get<T: Inject>(&self) -> Result<T, InjectError>
[src]
pub fn get_ref<T: 'static>(&self) -> Result<&T, InjectError>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Container
impl !Send for Container
impl !Sync for Container
impl Unpin for Container
impl !UnwindSafe for Container
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Inject for T where
T: 'static,
[src]
T: 'static,
impl<T> InjectExt for T where
T: Inject + Default,
[src]
T: Inject + Default,
fn inject(container: &Container) -> Result<Self, InjectError>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,