Struct typemap::OccupiedEntry
source · [−]pub struct OccupiedEntry<'a, K, A: ?Sized + UnsafeAnyExt + 'a = dyn UnsafeAny> { /* private fields */ }
Expand description
A view onto an occupied entry in a TypeMap.
Implementations
sourceimpl<'a, K: Key, A: UnsafeAnyExt + ?Sized> OccupiedEntry<'a, K, A>
impl<'a, K: Key, A: UnsafeAnyExt + ?Sized> OccupiedEntry<'a, K, A>
sourcepub fn get(&self) -> &K::Value where
K::Value: Any + Implements<A>,
pub fn get(&self) -> &K::Value where
K::Value: Any + Implements<A>,
Get a reference to the entry’s value.
sourcepub fn get_mut(&mut self) -> &mut K::Value where
K::Value: Any + Implements<A>,
pub fn get_mut(&mut self) -> &mut K::Value where
K::Value: Any + Implements<A>,
Get a mutable reference to the entry’s value.
sourcepub fn into_mut(self) -> &'a mut K::Value where
K::Value: Any + Implements<A>,
pub fn into_mut(self) -> &'a mut K::Value where
K::Value: Any + Implements<A>,
Transform the entry into a mutable reference with the same lifetime as the map.
Auto Trait Implementations
impl<'a, K, A: ?Sized> RefUnwindSafe for OccupiedEntry<'a, K, A> where
A: RefUnwindSafe,
K: RefUnwindSafe,
impl<'a, K, A: ?Sized> Send for OccupiedEntry<'a, K, A> where
A: Send,
K: Send,
impl<'a, K, A: ?Sized> Sync for OccupiedEntry<'a, K, A> where
A: Sync,
K: Sync,
impl<'a, K, A: ?Sized> Unpin for OccupiedEntry<'a, K, A> where
K: Unpin,
impl<'a, K, A = dyn UnsafeAny + 'static> !UnwindSafe for OccupiedEntry<'a, K, A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more