Struct type_set::entry::OccupiedEntry
source · pub struct OccupiedEntry<'a, T>(/* private fields */);
Expand description
A view into the location a T is stored
Implementations§
source§impl<'a, T: Send + Sync + 'static> OccupiedEntry<'a, T>
impl<'a, T: Send + Sync + 'static> OccupiedEntry<'a, T>
sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Gets a mutable reference to the value in the entry
If you need a reference to the OccupiedEntry
that may outlive the
destruction of the Entry
value, see OccupiedEntry::into_mut
.
sourcepub fn insert(&mut self, value: T) -> T
pub fn insert(&mut self, value: T) -> T
Sets the value of the entry to value
, returning the entry’s previous value.
sourcepub fn into_mut(self) -> &'a mut T
pub fn into_mut(self) -> &'a mut T
Converts the entry into a mutable reference to its value.
If you need multiple references to the OccupiedEntry
, see OccupiedEntry::get_mut
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for OccupiedEntry<'a, T>
impl<'a, T> !RefUnwindSafe for OccupiedEntry<'a, T>
impl<'a, T> Send for OccupiedEntry<'a, T>where
T: Send,
impl<'a, T> Sync for OccupiedEntry<'a, T>where
T: Sync,
impl<'a, T> Unpin for OccupiedEntry<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for OccupiedEntry<'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