pub struct InjectBuilder { /* private fields */ }
Available on crate feature
inject
only.Expand description
Represents the builder for an injected type.
Implementations§
Source§impl InjectBuilder
impl InjectBuilder
Sourcepub fn new(activator: Activator, lifetime: ServiceLifetime) -> Self
pub fn new(activator: Activator, lifetime: ServiceLifetime) -> Self
Sourcepub fn depends_on(self, dependency: ServiceDependency) -> Self
pub fn depends_on(self, dependency: ServiceDependency) -> Self
Defines a dependency used by the service.
§Arguments
dependency
- The dependency associated with the services
Sourcepub fn build(self) -> ServiceDescriptor
pub fn build(self) -> ServiceDescriptor
Builds and returns a new ServiceDescriptor
.
Trait Implementations§
Source§impl From<InjectBuilder> for ServiceDescriptor
impl From<InjectBuilder> for ServiceDescriptor
Source§fn from(value: InjectBuilder) -> Self
fn from(value: InjectBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InjectBuilder
impl !RefUnwindSafe for InjectBuilder
impl !Send for InjectBuilder
impl !Sync for InjectBuilder
impl Unpin for InjectBuilder
impl !UnwindSafe for InjectBuilder
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