pub struct Container { /* private fields */ }Implementations§
Source§impl Container
impl Container
pub fn new() -> Result<Self, DiError>
pub fn with_profiles( profiles: impl IntoIterator<Item = impl Into<String>>, ) -> Result<Self, DiError>
pub async fn resolve<T>(&self) -> Result<Arc<T>, DiError>
pub async fn resolve_named<T>(&self, name: &str) -> Result<Arc<T>, DiError>
pub async fn resolve_optional<T>(&self) -> Result<Option<Arc<T>>, DiError>
pub async fn resolve_all<T>(&self) -> Result<Vec<Arc<T>>, DiError>
pub fn request_context(&self) -> RequestContext<'_>
pub async fn initialize_eager(&self) -> Result<(), DiError>
pub async fn shutdown(&self) -> Result<(), DiError>
Auto Trait Implementations§
impl !Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin 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