pub enum InsertError<V> {
Exists(V),
CapacityExhausted,
}Expand description
Things that can go unhappily when trying to insert into a map
Variants§
Exists(V)
The new value was inserted successfully but there was already a value in the map for that key.
CapacityExhausted
The map is at capacity and cannot fit any more pairs.
Trait Implementations§
Source§impl<V: Clone> Clone for InsertError<V>
impl<V: Clone> Clone for InsertError<V>
Source§fn clone(&self) -> InsertError<V>
fn clone(&self) -> InsertError<V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V: Debug> Debug for InsertError<V>
impl<V: Debug> Debug for InsertError<V>
Source§impl<V: Ord> Ord for InsertError<V>
impl<V: Ord> Ord for InsertError<V>
Source§fn cmp(&self, other: &InsertError<V>) -> Ordering
fn cmp(&self, other: &InsertError<V>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<V: PartialEq> PartialEq for InsertError<V>
impl<V: PartialEq> PartialEq for InsertError<V>
Source§impl<V: PartialOrd> PartialOrd for InsertError<V>
impl<V: PartialOrd> PartialOrd for InsertError<V>
impl<V: Copy> Copy for InsertError<V>
impl<V: Eq> Eq for InsertError<V>
impl<V> StructuralPartialEq for InsertError<V>
Auto Trait Implementations§
impl<V> Freeze for InsertError<V>where
V: Freeze,
impl<V> RefUnwindSafe for InsertError<V>where
V: RefUnwindSafe,
impl<V> Send for InsertError<V>where
V: Send,
impl<V> Sync for InsertError<V>where
V: Sync,
impl<V> Unpin for InsertError<V>where
V: Unpin,
impl<V> UnwindSafe for InsertError<V>where
V: UnwindSafe,
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