pub enum ChunkAllocatorError {
    BadHeapMemory,
    BadBitmapMemory,
    BadChunkSize,
    OutOfMemory,
}
Expand description

Possible errors of ChunkAllocator.

Variants

BadHeapMemory

The backing memory for the heap must be

  • not empty
  • an multiple of the used chunk size that is a multiple of 8, and
  • not start at 0
  • be aligned to the chunk size.

BadBitmapMemory

The number of bits in the backing memory for the heap bitmap must match the number of chunks in the heap.

BadChunkSize

The chunk size must be not 0 and a power of 2.

OutOfMemory

The heap is either completely full or to fragmented to serve the request. Also, it may happen that the alignment can’t get guaranteed, because all aligned chunks are already in use.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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.