Struct std::collections::btree_map::OccupiedError
pub struct OccupiedError<'a, K, V> where K: 'a, V: 'a, { pub entry: OccupiedEntry<'a, K, V>, pub value: V, }
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>
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
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the given formatter. Read more
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<'a, K: Debug + Ord, V: Debug> Error for OccupiedError<'a, K, V>
fn description(&self) -> &str
use the Display impl or to_string()
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
Returns a stack backtrace, if available, of where this error occurred. Read more
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting
Auto Trait Implementations
impl<'a, K, V> RefUnwindSafe for OccupiedError<'a, K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Unpin for OccupiedError<'a, K, V> where
V: Unpin,
impl<'a, K, V> !UnwindSafe for OccupiedError<'a, K, V>
Blanket Implementations
impl<T> From<T> for T
pub fn from(t: T) -> T
Performs the conversion.
pub fn into(self) -> U
Performs the conversion.
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
Performs the conversion.
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
Performs the conversion.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedError.html