Enum std::collections::TryReserveErrorKind
source · pub enum TryReserveErrorKind {
CapacityOverflow,
AllocError {
layout: Layout,
/* private fields */
},
}
🔬This is a nightly-only experimental API. (
try_reserve_kind
#48043)Expand description
Details of the allocation that caused a TryReserveError
Variants§
CapacityOverflow
🔬This is a nightly-only experimental API. (
try_reserve_kind
#48043)Error due to the computed capacity exceeding the collection’s maximum
(usually isize::MAX
bytes).
AllocError
Fields
🔬This is a nightly-only experimental API. (
try_reserve_kind
#48043)The memory allocator returned an error
Trait Implementations§
source§impl Clone for TryReserveErrorKind
impl Clone for TryReserveErrorKind
source§fn clone(&self) -> TryReserveErrorKind
fn clone(&self) -> TryReserveErrorKind
Returns a copy 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 Debug for TryReserveErrorKind
impl Debug for TryReserveErrorKind
source§impl From<LayoutError> for TryReserveErrorKind
impl From<LayoutError> for TryReserveErrorKind
source§fn from(_: LayoutError) -> TryReserveErrorKind
fn from(_: LayoutError) -> TryReserveErrorKind
Always evaluates to TryReserveErrorKind::CapacityOverflow
.
source§impl From<TryReserveErrorKind> for TryReserveError
impl From<TryReserveErrorKind> for TryReserveError
source§fn from(kind: TryReserveErrorKind) -> TryReserveError
fn from(kind: TryReserveErrorKind) -> TryReserveError
Converts to this type from the input type.
source§impl PartialEq<TryReserveErrorKind> for TryReserveErrorKind
impl PartialEq<TryReserveErrorKind> for TryReserveErrorKind
source§fn eq(&self, other: &TryReserveErrorKind) -> bool
fn eq(&self, other: &TryReserveErrorKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.