Struct alloc::collections::btree_map::OccupiedError
source · pub struct OccupiedError<'a, K: 'a, V: 'a, A: Allocator + Clone = Global> {
pub entry: OccupiedEntry<'a, K, V, A>,
pub value: V,
}
🔬This is a nightly-only experimental API. (
map_try_insert
#82766)Expand description
当键已经存在时,由 try_insert
返回的错误。
包含占用的条目和未插入的值。
Fields§
§entry: OccupiedEntry<'a, K, V, A>
🔬This is a nightly-only experimental API. (
map_try_insert
#82766)map 中已被占用的条目。
value: V
🔬This is a nightly-only experimental API. (
map_try_insert
#82766)未插入的值,因为该条目已被占用。
Trait Implementations§
source§impl<'a, K: Debug + Ord, V: Debug, A: Allocator + Clone> Display for OccupiedError<'a, K, V, A>
impl<'a, K: Debug + Ord, V: Debug, A: Allocator + Clone> Display for OccupiedError<'a, K, V, A>
source§impl<'a, K: Debug + Ord, V: Debug> Error for OccupiedError<'a, K, V>
impl<'a, K: Debug + Ord, V: Debug> Error for OccupiedError<'a, K, V>
Auto Trait Implementations§
impl<'a, K, V, A> RefUnwindSafe for OccupiedError<'a, K, V, A>where A: RefUnwindSafe, K: RefUnwindSafe, V: RefUnwindSafe,
impl<'a, K, V, A> Send for OccupiedError<'a, K, V, A>where A: Send, K: Send, V: Send,
impl<'a, K, V, A> Sync for OccupiedError<'a, K, V, A>where A: Sync, K: Sync, V: Sync,
impl<'a, K, V, A> Unpin for OccupiedError<'a, K, V, A>where A: Unpin, V: Unpin,
impl<'a, K, V, A = Global> !UnwindSafe for OccupiedError<'a, K, V, A>
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
从拥有的值中借用。 Read more