pub struct AllocStorage<R: LayoutSpec> { /* private fields */ }
This is supported on crate feature alloc only.
Expand description

A fat pointer to a heap-allocated storage block conforming to a LayoutSpec.

Implementations

Allocates a new storage block with the specified capacity with the global allocator.

Panics

Panics if capacity is large enough to cause a layout error, or if allocation fails.

Trait Implementations

Executes the destructor for this type. Read more

Extracts a pointer to the beginning of the memory block. Read more

Extracts a mutable pointer to the beginning of the memory block. Read more

Returns the maximum number of items the memory block can hold. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.