pub struct Container { /* private fields */ }
Implementations§
Source§impl Container
impl Container
pub async fn register<T: InstanceTrait>(&mut self) -> Result<(), ContainerError>
pub async fn boot(self) -> Result<(), ContainerError>
pub fn cleanup(&self) -> Result<(), ContainerError>
pub fn instances(&self) -> Vec<&String>
pub fn resolve<T: InstanceTrait>(&self) -> Result<&T, ContainerError>
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