pub struct ContainerBuilder { /* private fields */ }Expand description
Builder for constructing dependency containers with explicit ordering
Implementations§
Source§impl ContainerBuilder
impl ContainerBuilder
Sourcepub fn new() -> ContainerBuilder
pub fn new() -> ContainerBuilder
Create a new container builder
Sourcepub fn mark_initialized(&mut self, name: &str)
pub fn mark_initialized(&mut self, name: &str)
Mark a dependency as initialized
Sourcepub fn is_initialized(&self, name: &str) -> bool
pub fn is_initialized(&self, name: &str) -> bool
Check if a dependency has been initialized
Sourcepub fn initialization_order(&self) -> &[String]
pub fn initialization_order(&self) -> &[String]
Get the initialization order
Sourcepub fn validate_dependencies(
&self,
deps: &[&str],
) -> Result<(), DependencyError>
pub fn validate_dependencies( &self, deps: &[&str], ) -> Result<(), DependencyError>
Validate that all dependencies for a type are initialized
Trait Implementations§
Source§impl Default for ContainerBuilder
impl Default for ContainerBuilder
Source§fn default() -> ContainerBuilder
fn default() -> ContainerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for ContainerBuilder
impl Freeze for ContainerBuilder
impl Move for ContainerBuilder
impl RefUnwindSafe for ContainerBuilder
impl Send for ContainerBuilder
impl Sync for ContainerBuilder
impl Unpin for ContainerBuilder
impl UnsafeUnpin for ContainerBuilder
impl UnwindSafe for ContainerBuilder
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