Struct anymap::raw::OccupiedEntry
[−]
[src]
pub struct OccupiedEntry<'a, A: ?Sized + UncheckedAnyExt> { /* fields omitted */ }
A view into a single occupied location in a RawMap.
Methods
impl<'a, A: ?Sized + UncheckedAnyExt> OccupiedEntry<'a, A>[src]
impl<'a, A: ?Sized + UncheckedAnyExt> OccupiedEntry<'a, A>pub fn get(&self) -> &A[src]
pub fn get(&self) -> &AGets a reference to the value in the entry.
pub fn get_mut(&mut self) -> &mut A[src]
pub fn get_mut(&mut self) -> &mut AGets a mutable reference to the value in the entry.
pub fn into_mut(self) -> &'a mut A[src]
pub fn into_mut(self) -> &'a mut AConverts the OccupiedEntry into a mutable reference to the value in the entry with a lifetime bound to the collection itself.
pub unsafe fn insert(&mut self, value: Box<A>) -> Box<A>[src]
pub unsafe fn insert(&mut self, value: Box<A>) -> Box<A>Sets the value of the entry, and returns the entry's old value.
It is the caller’s responsibility to ensure that the key of the entry corresponds with
the type ID of value. If they do not, memory safety may be violated.
pub fn remove(self) -> Box<A>[src]
pub fn remove(self) -> Box<A>Takes the value out of the entry, and returns it.
Trait Implementations
Auto Trait Implementations
impl<'a, A> !Send for OccupiedEntry<'a, A>
impl<'a, A> !Send for OccupiedEntry<'a, A>impl<'a, A> !Sync for OccupiedEntry<'a, A>
impl<'a, A> !Sync for OccupiedEntry<'a, A>