pub struct Container { /* private fields */ }Implementations§
Source§impl Container
impl Container
pub fn new() -> Self
pub fn bind_singleton<InjTraitType, ActType>(self) -> Self
pub fn bind_transient<InjTraitType, ActType>(self) -> Self
Sourcepub fn resolve_mut<InjTraitType>(
&mut self,
) -> Result<InjTraitType, InjectionError>where
InjTraitType: 'static + Clone,
pub fn resolve_mut<InjTraitType>(
&mut self,
) -> Result<InjTraitType, InjectionError>where
InjTraitType: 'static + Clone,
In case of non stored singeleton, this resolve fn will store the resolution result
Sourcepub fn resolve<InjTraitType>(&self) -> Result<InjTraitType, InjectionError>where
InjTraitType: 'static + Clone,
pub fn resolve<InjTraitType>(&self) -> Result<InjTraitType, InjectionError>where
InjTraitType: 'static + Clone,
In case of non stored singeleton, this resolve fn will NOT store the resolution result
pub fn bind_container_into(self, container: Self) -> Self
Sourcepub fn build(self) -> Result<Self, InjectionError>
pub fn build(self) -> Result<Self, InjectionError>
tires to store all singeletons so later the container can be used with a non mut resolve fn
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Container
impl !RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl !UnwindSafe for Container
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more