Expand description
Memory allocation APIs.
This crate’s Allocator, AllocError and Global resemble the types and traits from
the nightly allocator api of the standard library (3528a5b 2025-05-11).
bump-scope provides compatibility with the allocator apis of:
- the nightly standard library via the feature
nightly-allocator-api allocator_api2version 0.2 via the featureallocator-api2-02allocator_api2version 0.3 via the featureallocator-api2-03
Bump and Bump(Scope) will implement those foreign Allocator traits when the respective feature is enabled.
You can also use implementors of their Allocator trait as base allocators via the compat wrapper types.
You can convert between this crate’s AllocError and foreign one’s via the From and Into traits.
Modules§
- compat
- Contains wrappers that makes implementors of foreign
Allocatortraits implement this crate’sAllocatorand vice versa.
Structs§
- Alloc
Error - The
AllocErrorerror indicates an allocation failure that may be due to resource exhaustion or to something wrong when combining the given input arguments with this allocator. - Global
alloc - The global memory allocator.