pub enum Entry<'a, T> {
Vacant(VacantEntry<'a, T>),
Occupied(OccupiedEntry<'a, T>),
}Variants§
Vacant(VacantEntry<'a, T>)
Occupied(OccupiedEntry<'a, T>)
Implementations§
Source§impl<'a, T> Entry<'a, T>
impl<'a, T> Entry<'a, T>
pub fn and_modify(self, f: impl FnOnce(&mut T)) -> Self
pub fn insert_entry(self, value: T) -> OccupiedEntry<'a, T>
pub fn or_default(self) -> &'a mut Twhere
T: Default,
pub fn or_insert(self, default: T) -> &'a mut T
pub fn or_insert_with(self, default: impl FnOnce() -> T) -> &'a mut T
Auto Trait Implementations§
impl<'a, T> Freeze for Entry<'a, T>
impl<'a, T> RefUnwindSafe for Entry<'a, T>where
T: RefUnwindSafe,
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>
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