Struct compact_map::OccupiedError
source · pub struct OccupiedError<'a, K: 'a, V: 'a, const N: usize> {
pub entry: OccupiedEntry<'a, K, V, N>,
pub value: V,
}
Expand description
The error returned by try_insert
when the key already exists.
Contains the occupied entry, and the value that was not inserted.
Fields§
§entry: OccupiedEntry<'a, K, V, N>
The entry in the map that was already occupied.
value: V
The value which was not inserted, because the entry was already occupied.
Trait Implementations§
source§impl<'a, K: Debug, V: Debug, const N: usize> Error for OccupiedError<'a, K, V, N>
impl<'a, K: Debug, V: Debug, const N: usize> Error for OccupiedError<'a, K, V, N>
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations§
impl<'a, K, V, const N: usize> Freeze for OccupiedError<'a, K, V, N>
impl<'a, K, V, const N: usize> RefUnwindSafe for OccupiedError<'a, K, V, N>where
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<'a, K, V, const N: usize> Send for OccupiedError<'a, K, V, N>
impl<'a, K, V, const N: usize> Sync for OccupiedError<'a, K, V, N>
impl<'a, K, V, const N: usize> Unpin for OccupiedError<'a, K, V, N>
impl<'a, K, V, const N: usize> !UnwindSafe for OccupiedError<'a, K, V, N>
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