Crate storage_api
source · [−]Expand description
A proof-of-concept implementation of (one version of) the storages proposal.
Describing the raw storage API, we have:
Storage
: a storage that manages a single memory allocationMultipleStorage
: a storage that can manage multiple handlesSharedMutabilityStorage
andPinningStorage
for advanced use
Providing a safe wrapper around Storage
use (up to uninit memory):
Useful implementations of Storage
:
InlineStorage
: single storage located in the storage’s bytesAllocStorage
: full-featured storage via allocationSmallStorage
: inline storage with a fallback to allocationBorrowedStorage
: single storage located in someone else’s memory
Structs
A storage that stores objects via an Allocator
.
A single storage which stores memory in borrowed space.
A pointer type for heap allocation. A tiny subset of std’s Box.
Dynamic single storage for use with RawBox<dyn Trait, DynStorage<A>>
.
A single storage which stores memory inline.
A raw box around some storage. Bundles the storage and its handle.
A raw vec around some slice storage. Bundles the storage and its handle.
A single storage which stores memory inline if it fits, otherwise falling
back to using an Allocator
.
Traits
A storage that can manage multiple memory handles.
A storage that allocates pinned memory handles.
A storage that serves as a uniqueness barrier.
Types which can be used to manage memory handles.