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>
Sourcepub async fn validate(&self) -> Result<(), DiError>
pub async fn validate(&self) -> Result<(), DiError>
Validates the active singleton graph by constructing every singleton. This surfaces missing, ambiguous, circular, and invalid-scope dependencies during application startup instead of on the first request.
pub async fn shutdown(&self) -> Result<(), DiError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Container
impl !UnwindSafe for Container
impl Freeze for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin 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