pub struct ServiceDescriptor {
pub type_id: TypeId,
pub type_name: &'static str,
pub key: Option<ServiceKey>,
pub factory: ServiceFactory,
pub keyed_factory: Option<KeyedServiceFactory>,
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<ServiceKey>§factory: ServiceFactory§keyed_factory: Option<KeyedServiceFactory>Factory used by AnyKey fallback registrations; receives the requested key.
async_factory: Option<AsyncServiceFactory>§lifetime: ServiceLifetimeTrait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceDescriptor
impl !UnwindSafe for ServiceDescriptor
impl Forget for ServiceDescriptor
impl Freeze for ServiceDescriptor
impl Move 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