Enum toad_common::map::InsertError
source · [−]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
sourceimpl<V: Clone> Clone for InsertError<V>
impl<V: Clone> Clone for InsertError<V>
sourcefn clone(&self) -> InsertError<V>
fn clone(&self) -> InsertError<V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<V: Debug> Debug for InsertError<V>
impl<V: Debug> Debug for InsertError<V>
sourceimpl<V: Ord> Ord for InsertError<V>
impl<V: Ord> Ord for InsertError<V>
sourcefn cmp(&self, other: &InsertError<V>) -> Ordering
fn cmp(&self, other: &InsertError<V>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<V: PartialEq> PartialEq<InsertError<V>> for InsertError<V>
impl<V: PartialEq> PartialEq<InsertError<V>> for InsertError<V>
sourcefn eq(&self, other: &InsertError<V>) -> bool
fn eq(&self, other: &InsertError<V>) -> bool
sourceimpl<V: PartialOrd> PartialOrd<InsertError<V>> for InsertError<V>
impl<V: PartialOrd> PartialOrd<InsertError<V>> for InsertError<V>
sourcefn partial_cmp(&self, other: &InsertError<V>) -> Option<Ordering>
fn partial_cmp(&self, other: &InsertError<V>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<V: Copy> Copy for InsertError<V>
impl<V: Eq> Eq for InsertError<V>
impl<V> StructuralEq for InsertError<V>
impl<V> StructuralPartialEq for InsertError<V>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more