pub struct CollectionBindingBuilder<TInterface: ?Sized + 'static> { /* private fields */ }
Expand description
Builder for collection bindings that works with closure-based configuration
Implementations§
Source§impl<TInterface: ?Sized + 'static> CollectionBindingBuilder<TInterface>
impl<TInterface: ?Sized + 'static> CollectionBindingBuilder<TInterface>
pub fn new() -> Self
Sourcepub fn add<TImpl: Send + Sync + Default + 'static>(&mut self) -> &mut Self
pub fn add<TImpl: Send + Sync + Default + 'static>(&mut self) -> &mut Self
Add a service to the collection
Sourcepub fn add_named<TImpl: Send + Sync + Default + 'static>(
&mut self,
name: impl Into<String>,
) -> &mut Self
pub fn add_named<TImpl: Send + Sync + Default + 'static>( &mut self, name: impl Into<String>, ) -> &mut Self
Add a named service to the collection
Sourcepub fn add_singleton<TImpl: Send + Sync + Default + 'static>(
&mut self,
) -> &mut Self
pub fn add_singleton<TImpl: Send + Sync + Default + 'static>( &mut self, ) -> &mut Self
Add a service with singleton lifetime
Trait Implementations§
Auto Trait Implementations§
impl<TInterface> Freeze for CollectionBindingBuilder<TInterface>where
TInterface: ?Sized,
impl<TInterface> !RefUnwindSafe for CollectionBindingBuilder<TInterface>
impl<TInterface> !Send for CollectionBindingBuilder<TInterface>
impl<TInterface> !Sync for CollectionBindingBuilder<TInterface>
impl<TInterface> Unpin for CollectionBindingBuilder<TInterface>where
TInterface: ?Sized,
impl<TInterface> !UnwindSafe for CollectionBindingBuilder<TInterface>
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