pub struct RcIdStore<T>(/* private fields */);
Expand description
A store keyed by id.
Implementations§
Source§impl<T> RcIdStore<T>
impl<T> RcIdStore<T>
pub fn new() -> Self
pub fn store(&self, message_id: u32, data: T)
pub fn store_with_guard( &self, message_id: u32, data: T, ) -> RcIdStoreGuard<'_, T>
pub fn store_with_owned_guard( &self, message_id: u32, data: T, ) -> RcIdStoreOwnedGuard<T>
pub fn take(&self, message_id: u32) -> Option<T>
pub fn take_all(&self) -> HashMap<u32, T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RcIdStore<T>
impl<T> !RefUnwindSafe for RcIdStore<T>
impl<T> !Send for RcIdStore<T>
impl<T> !Sync for RcIdStore<T>
impl<T> Unpin for RcIdStore<T>
impl<T> !UnwindSafe for RcIdStore<T>
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