pub struct BatchBuilder<'a> { /* private fields */ }Expand description
Fluent batch registration builder.
Provides a chainable API for registering multiple services without closure overhead.
Implementations§
Source§impl<'a> BatchBuilder<'a>
impl<'a> BatchBuilder<'a>
Sourcepub fn singleton<T: Injectable>(self, instance: T) -> Self
pub fn singleton<T: Injectable>(self, instance: T) -> Self
Register a singleton and continue the chain
Sourcepub fn lazy<T: Injectable, F>(self, factory: F) -> Self
pub fn lazy<T: Injectable, F>(self, factory: F) -> Self
Register a lazy singleton and continue the chain
Sourcepub fn transient<T: Injectable, F>(self, factory: F) -> Self
pub fn transient<T: Injectable, F>(self, factory: F) -> Self
Register a transient and continue the chain
Auto Trait Implementations§
impl<'a> Freeze for BatchBuilder<'a>
impl<'a> !RefUnwindSafe for BatchBuilder<'a>
impl<'a> Send for BatchBuilder<'a>
impl<'a> Sync for BatchBuilder<'a>
impl<'a> Unpin for BatchBuilder<'a>
impl<'a> UnsafeUnpin for BatchBuilder<'a>
impl<'a> !UnwindSafe for BatchBuilder<'a>
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
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging