Skip to main content

Module alloc

Module alloc 

Source
Expand description

Turso-owned allocation namespace.

Stable builds use std collections where allocator parameters are not available. Builds compiled with --cfg nightly use Rust’s unstable allocator_api collection parameters.

Structs§

AllocError
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.
AllocationSiteGuard
DynAllocator
Global
The global memory allocator.
Layout
Layout of a block of memory.
TryReserveError
TursoAllocator

Enums§

AllocationSite
MvStoreAllocationSite
MvccCheckpointAllocationSite
SchemaAllocationSite
SetAllocatorError

Constants§

ALLOC_ERR_MSG

Traits§

ApiAllocator
The underlying allocator trait: allocator_api2::alloc::Allocator on stable, std::alloc::Allocator on --cfg nightly builds. An implementation of Allocator can allocate, grow, shrink, and deallocate arbitrary blocks of data described via Layout.
ConcurrentAllocator
Allocator safe to clone into concurrent data structures and deferred drops.
TryClone
TursoAllocBackend
Backend for Turso heap allocations.
TursoAllocExt
TursoBinaryHeapExt
TursoBoxExt
TursoFromIterator
TursoHashMapExt
TursoHashSetExt
TursoIteratorExt
TursoNewExt
TursoSliceExt
Conversion from a slice into an allocator-aware Vec.
TursoTryNewExt
TursoTryWithCapacityExt
TursoVecDequeExt
TursoVecExt
TursoVecInExt

Functions§

current_allocation_site
enter_allocation_site
set_allocator
Sets Turso’s process-wide allocation backend once.
try_arc_slice_from_slice
try_arc_slice_from_slice_in

Type Aliases§

Allocator
Arc
ArcSlice
BTreeMap
BTreeSet
BinaryHeap
Box
BoxedSlice
Boxed slice that keeps the allocator parameter on nightly.
HashMap
HashSet
LinkedList
Rc
RcWeak
String
Vec
VecDeque
Weak