# Enum alloc::collections::TryReserveErrorKind
[−][src]

    pub enum TryReserveErrorKind {
        CapacityOverflow,
        AllocError {
            layout: Layout,
            // some fields omitted
        },
    }

🔬 This is a nightly-only experimental API. (`try_reserve_kind` #48043)

Uncertain how much info should be exposed

Expand description

Details of the allocation that caused a `TryReserveError`

## Variants

`CapacityOverflow`
🔬 This is a nightly-only experimental API. (`try_reserve_kind` #48043)

Uncertain how much info should be exposed

Error due to the computed capacity exceeding the collection’s maximum (usually `isize::MAX` bytes).

`AllocError`
🔬 This is a nightly-only experimental API. (`try_reserve_kind` #48043)

Uncertain how much info should be exposed

The memory allocator returned an error

### Fields of AllocError

`layout: Layout`
🔬 This is a nightly-only experimental API. (`try_reserve_kind` #48043)

Uncertain how much info should be exposed

The layout of allocation request that failed

## Trait Implementations

[src]

### impl Clone for TryReserveErrorKind

[src]

#### fn clone(&self) -> TryReserveErrorKind

Returns a copy of the value. Read more

1.0.0[src]

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more

[src]

### impl Debug for TryReserveErrorKind

[src]

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

[src]

### impl From<LayoutError> for TryReserveErrorKind

[src]

#### fn from(_: LayoutError) -> Self

Always evaluates to `TryReserveErrorKind::CapacityOverflow`.

[src]

### impl From<TryReserveErrorKind> for TryReserveError

[src]

#### fn from(kind: TryReserveErrorKind) -> Self

Performs the conversion.

[src]

### impl PartialEq<TryReserveErrorKind> for TryReserveErrorKind

[src]

#### fn eq(&self, other: &TryReserveErrorKind) -> bool

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

[src]

#### fn ne(&self, other: &TryReserveErrorKind) -> bool

This method tests for `!=`.

[src]

### impl Eq for TryReserveErrorKind

[src]

### impl StructuralEq for TryReserveErrorKind

[src]

### impl StructuralPartialEq for TryReserveErrorKind

## Auto Trait Implementations

### impl RefUnwindSafe for TryReserveErrorKind

### impl Send for TryReserveErrorKind

### impl Sync for TryReserveErrorKind

### impl Unpin for TryReserveErrorKind

### impl UnwindSafe for TryReserveErrorKind

## Blanket Implementations

[src]

### impl<T> Any for T where
T: 'static + ?Sized,

[src]

#### pub fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more

[src]

### impl<T> Borrow<T> for T where
T: ?Sized,

[src]

#### pub fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

[src]

### impl<T> BorrowMut<T> for T where
T: ?Sized,

[src]

#### pub fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more

[src]

### impl<T> From<T> for T

[src]

#### pub fn from(t: T) -> T

Performs the conversion.

[src]

### impl<T, U> Into<U> for T where
U: From<T>,

[src]

#### pub fn into(self) -> U

Performs the conversion.

[src]

### impl<T> ToOwned for T where
T: Clone,

#### type Owned = T

The resulting type after obtaining ownership.

[src]

#### pub fn to_owned(&Self) -> T

Creates owned data from borrowed data, usually by cloning. Read more

[src]

#### pub fn clone_into(&Self, &mut T)

🔬 This is a nightly-only experimental API. (`toowned_clone_into` #41263)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

[src]

### impl<T, U> TryFrom<U> for T where
U: Into<T>,

#### type Error = Infallible

The type returned in the event of a conversion error.

[src]

#### pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.

[src]

### impl<T, U> TryInto<U> for T where
U: TryFrom<T>,

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

[src]

#### pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.