pub struct OccupiedError<'a, V: 'a> {
pub current: &'a V,
pub not_inserted: V,
}
Expand description
An error returned by try_insert
when the key already exists.
Contains the existing value, and the value that was not inserted.
Fields§
§current: &'a V
The value in the map that was already present.
not_inserted: V
The value which was not inserted, because the entry was already occupied.
Trait Implementations§
Source§impl<'a, V: Debug + 'a> Debug for OccupiedError<'a, V>
impl<'a, V: Debug + 'a> Debug for OccupiedError<'a, V>
Source§impl<'a, V: PartialEq + 'a> PartialEq for OccupiedError<'a, V>
impl<'a, V: PartialEq + 'a> PartialEq for OccupiedError<'a, V>
impl<'a, V: Eq + 'a> Eq for OccupiedError<'a, V>
impl<'a, V: 'a> StructuralPartialEq for OccupiedError<'a, V>
Auto Trait Implementations§
impl<'a, V> Freeze for OccupiedError<'a, V>where
V: Freeze,
impl<'a, V> RefUnwindSafe for OccupiedError<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for OccupiedError<'a, V>
impl<'a, V> Sync for OccupiedError<'a, V>where
V: Sync,
impl<'a, V> Unpin for OccupiedError<'a, V>where
V: Unpin,
impl<'a, V> UnwindSafe for OccupiedError<'a, V>where
V: UnwindSafe + RefUnwindSafe,
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.