pub struct ServiceDescriptorBuilder<TInterface: ?Sized, TImpl> { /* private fields */ }
Expand description
Builder for service descriptors
Implementations§
Source§impl<TInterface: ?Sized + 'static, TImpl: Send + Sync + Default + 'static> ServiceDescriptorBuilder<TInterface, TImpl>
impl<TInterface: ?Sized + 'static, TImpl: Send + Sync + Default + 'static> ServiceDescriptorBuilder<TInterface, TImpl>
Sourcepub fn with_lifetime(self, lifetime: ServiceScope) -> Self
pub fn with_lifetime(self, lifetime: ServiceScope) -> Self
Set the service lifetime
Sourcepub fn depends_on<T: 'static>(self) -> Self
pub fn depends_on<T: 'static>(self) -> Self
Add a dependency
Sourcepub fn depends_on_named<T: 'static>(self, name: impl Into<String>) -> Self
pub fn depends_on_named<T: 'static>(self, name: impl Into<String>) -> Self
Add a named dependency
Sourcepub fn build(self) -> ServiceDescriptor
pub fn build(self) -> ServiceDescriptor
Build the service descriptor
Trait Implementations§
Auto Trait Implementations§
impl<TInterface, TImpl> Freeze for ServiceDescriptorBuilder<TInterface, TImpl>where
TInterface: ?Sized,
impl<TInterface, TImpl> RefUnwindSafe for ServiceDescriptorBuilder<TInterface, TImpl>
impl<TInterface, TImpl> !Send for ServiceDescriptorBuilder<TInterface, TImpl>
impl<TInterface, TImpl> !Sync for ServiceDescriptorBuilder<TInterface, TImpl>
impl<TInterface, TImpl> Unpin for ServiceDescriptorBuilder<TInterface, TImpl>
impl<TInterface, TImpl> UnwindSafe for ServiceDescriptorBuilder<TInterface, TImpl>
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