pub struct ServiceDescriptor {
pub type_id: TypeId,
pub type_name: &'static str,
pub key: Option<String>,
pub factory: ServiceFactory,
pub async_factory: Option<AsyncServiceFactory>,
pub lifetime: ServiceLifetime,
}Expand description
Service descriptor holds registration metadata for a service.
Created during ServiceCollection building and passed to ServiceStore
to create ServiceEntry.
Fields§
§type_id: TypeId§type_name: &'static str§key: Option<String>§factory: ServiceFactory§async_factory: Option<AsyncServiceFactory>§lifetime: ServiceLifetimeTrait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceDescriptor
impl !UnwindSafe for ServiceDescriptor
impl Freeze for ServiceDescriptor
impl Send for ServiceDescriptor
impl Sync for ServiceDescriptor
impl Unpin for ServiceDescriptor
impl UnsafeUnpin for ServiceDescriptor
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