pub struct Entry<'a, T, S>(/* private fields */);
Expand description
Implementations§
Source§impl<'a, T, S> Entry<'a, T, S>
impl<'a, T, S> Entry<'a, T, S>
Sourcepub fn and_modify<F>(self, f: F) -> Self
pub fn and_modify<F>(self, f: F) -> Self
Provides in-place mutable access to an occupied entry before potential inserts into the map.
Sourcepub fn or_insert(self) -> usize
pub fn or_insert(self) -> usize
Ensures there is at least one instance of the value before returning a mutable reference to the value’s count
Sourcepub fn or_insert_many(self, quantity: usize) -> usize
pub fn or_insert_many(self, quantity: usize) -> usize
Ensures there is at least quantity
instances of the value before returning a mutable reference
to the value’s count
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, S> Freeze for Entry<'a, T, S>where
T: Freeze,
impl<'a, T, S> RefUnwindSafe for Entry<'a, T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, S> Send for Entry<'a, T, S>
impl<'a, T, S> Sync for Entry<'a, T, S>
impl<'a, T, S> Unpin for Entry<'a, T, S>
impl<'a, T, S> !UnwindSafe for Entry<'a, T, S>
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