pub enum ServiceEntry {
Instance(Arc<dyn Any + Send + Sync>),
Factory(Box<dyn Fn() -> Box<dyn Any + Send + Sync> + Send + Sync>),
}
Expand description
Service entry in the registry
Variants§
Instance(Arc<dyn Any + Send + Sync>)
Single instance (singleton)
Factory(Box<dyn Fn() -> Box<dyn Any + Send + Sync> + Send + Sync>)
Factory function for creating instances
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceEntry
impl !RefUnwindSafe for ServiceEntry
impl Send for ServiceEntry
impl Sync for ServiceEntry
impl Unpin for ServiceEntry
impl !UnwindSafe for ServiceEntry
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