pub struct OccupiedEntry<'a, T: IdOrdItem> { /* private fields */ }
Implementations§
Source§impl<'a, T: IdOrdItem> OccupiedEntry<'a, T>
impl<'a, T: IdOrdItem> OccupiedEntry<'a, T>
Sourcepub fn get(&self) -> &T
pub fn get(&self) -> &T
Gets a reference to the value.
If you need a reference to T
that may outlive the destruction of the
Entry
value, see into_ref
.
Sourcepub fn get_mut<'b>(&'b mut self) -> RefMut<'b, T>
pub fn get_mut<'b>(&'b mut self) -> RefMut<'b, T>
Gets a mutable reference to the value.
If you need a reference to T
that may outlive the destruction of the
Entry
value, see into_mut
.
Sourcepub fn into_ref(self) -> &'a T
pub fn into_ref(self) -> &'a T
Converts self into a reference to the value.
If you need multiple references to the OccupiedEntry
, see
get
.
Sourcepub fn into_mut(self) -> RefMut<'a, T>
pub fn into_mut(self) -> RefMut<'a, T>
Converts self into a mutable reference to the value.
If you need multiple references to the OccupiedEntry
, see
get_mut
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for OccupiedEntry<'a, T>
impl<'a, T> RefUnwindSafe for OccupiedEntry<'a, T>where
T: RefUnwindSafe,
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>
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