Module kalloc::wrapper[][src]

Expand description

OOM wrapper functions.

Structs

AllocErrorExperimental

The AllocError error indicates an allocation failure that may be due to resource exhaustion or to something wrong when combining the given input arguments with this allocator.

HashMap

A hash map implemented with quadratic probing and SIMD lookup.

String

A UTF-8–encoded, growable string.

Vec

A contiguous growable array type, written as Vec<T> and pronounced ‘vector’.

VecDeque

A double-ended queue implemented with a growable ring buffer.

Enums

TryReserveErrorExperimental

The error type for try_reserve methods.

Functions

deque_push_back

OOM Wrapper to push back an element to a deque.

deque_push_front

OOM Wrapper to push front an element to a deque.

map_insert

OOM Wrapper to insert key-valud pair to a hash map.

r2a

Map TryReserveError to AllocError for consistency.

str_push

OOM Wrapper to push back an element into a vector. Amortized O(1).

vec_push

OOM Wrapper to push back an element into a vector. Amortized O(1).

vec_shrink_to_fit

OOM Wrapper to shrink a vector. O(N).