pub struct ServiceLocator { /* private fields */ }Expand description
Service locator holding named service descriptors and opaque payloads as JSON strings.
Implementations§
Source§impl ServiceLocator
impl ServiceLocator
pub fn new() -> Self
pub fn register( &mut self, name: &str, type_tag: &str, version: u32, payload: &str, )
pub fn unregister(&mut self, name: &str) -> bool
pub fn lookup(&mut self, name: &str) -> Option<&ServiceDescriptor>
pub fn payload(&self, name: &str) -> Option<&str>
pub fn set_enabled(&mut self, name: &str, enabled: bool) -> bool
pub fn is_registered(&self, name: &str) -> bool
pub fn count(&self) -> usize
pub fn lookup_count(&self) -> u64
pub fn names(&self) -> Vec<&str>
pub fn by_type(&self, type_tag: &str) -> Vec<&ServiceDescriptor>
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceLocator
impl RefUnwindSafe for ServiceLocator
impl Send for ServiceLocator
impl Sync for ServiceLocator
impl Unpin for ServiceLocator
impl UnsafeUnpin for ServiceLocator
impl UnwindSafe for ServiceLocator
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