pub struct Container { /* private fields */ }Implementations§
Source§impl Container
impl Container
pub fn new(top: Arc<dyn Middleware>) -> Self
pub fn with_singleton<S, Args, F>(&self, creation_fn: F) -> Selfwhere
S: Service + ?Sized,
Arc<dyn Middleware>: ResolveStart<Args>,
F: Fn(Args) -> Result<Box<S>> + Send + Sync + 'static,
pub fn with_singleton_ok<S, Args, F>(&self, creation_fn: F) -> Selfwhere
S: Service + ?Sized,
Arc<dyn Middleware>: ResolveStart<Args>,
F: Fn(Args) -> Box<S> + Send + Sync + 'static,
pub fn resolve<X>(&self) -> Result<X>
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