pub struct Entry<'a, T> { /* private fields */ }Implementations§
Source§impl<'a, T> Entry<'a, T>where
T: ErasedTy,
impl<'a, T> Entry<'a, T>where
T: ErasedTy,
pub fn new(entry: Entry<'a, TypeId, Box<dyn Any + Sync + Send>>) -> Entry<'a, T>
pub fn key(&self) -> &TypeId
pub fn or_insert(self, val: T) -> &'a mut T
pub fn or_insert_with<F>(self, f: F) -> &'a mut Twhere
F: FnOnce() -> T,
pub fn or_insert_with_key<F>(self, f: F) -> &'a mut T
pub fn and_modify<F>(self, f: F) -> Entry<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Entry<'a, T>
impl<'a, T> !RefUnwindSafe for Entry<'a, T>
impl<'a, T> Send for Entry<'a, T>where
T: Send,
impl<'a, T> Sync for Entry<'a, T>where
T: Sync,
impl<'a, T> Unpin for Entry<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for Entry<'a, T>
impl<'a, T> !UnwindSafe for Entry<'a, 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