pub struct InstanceRegistry;Implementations§
Source§impl InstanceRegistry
impl InstanceRegistry
pub fn register_arc<T: Send + Sync + 'static>(instance: Arc<T>) -> Option<u64>
pub fn register<T: Send + Sync + 'static>(instance: T) -> Option<u64>
pub fn get_with_optional_id<T: Send + Sync + 'static>( id: Option<&u64>, ) -> Option<Arc<T>>
pub fn get<T: Send + Sync + 'static>(id: &u64) -> Option<Arc<T>>
pub fn get_raw(id: &u64) -> Option<Arc<dyn Any + Send + Sync>>
pub fn remove(id: &u64)
pub fn remove_all()
Auto Trait Implementations§
impl Freeze for InstanceRegistry
impl RefUnwindSafe for InstanceRegistry
impl Send for InstanceRegistry
impl Sync for InstanceRegistry
impl Unpin for InstanceRegistry
impl UnsafeUnpin for InstanceRegistry
impl UnwindSafe for InstanceRegistry
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