pub struct ScopedServiceManager { /* private fields */ }Expand description
Scoped service manager for managing services within a specific scope
Implementations§
Source§impl ScopedServiceManager
impl ScopedServiceManager
Sourcepub fn add_service<T>(&mut self, service: T)
pub fn add_service<T>(&mut self, service: T)
Add a service to this scope
Sourcepub fn get_service<T>(&self) -> Option<&T>
pub fn get_service<T>(&self) -> Option<&T>
Get a service from this scope
Sourcepub fn has_service<T>(&self) -> bool
pub fn has_service<T>(&self) -> bool
Check if a service exists in this scope
Sourcepub fn service_count(&self) -> usize
pub fn service_count(&self) -> usize
Get the number of services in this scope
Trait Implementations§
Source§impl Debug for ScopedServiceManager
impl Debug for ScopedServiceManager
Auto Trait Implementations§
impl Freeze for ScopedServiceManager
impl !RefUnwindSafe for ScopedServiceManager
impl Send for ScopedServiceManager
impl Sync for ScopedServiceManager
impl Unpin for ScopedServiceManager
impl !UnwindSafe for ScopedServiceManager
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