pub struct Di { /* private fields */ }Implementations§
Source§impl Di
impl Di
pub fn register_single<T>(instance: T)
pub fn register_async_single<T>(instance: T)
pub fn register<T, F>(factory: F)
pub fn get_inner<T: 'static>(&self) -> Result<T, Box<dyn Error>>
pub fn get<T: 'static>() -> Result<T, Box<dyn Error>>
pub fn get_single<T: Any + Send + Sync + 'static>() -> Option<SingleRef<T>>
pub fn get_async_single<T: Any + Send + Sync + 'static>() -> Option<SingleAsyncRef<T>>
Auto Trait Implementations§
impl !Freeze for Di
impl !RefUnwindSafe for Di
impl Send for Di
impl Sync for Di
impl Unpin for Di
impl !UnwindSafe for Di
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