Skip to main content

Module adapter

Module adapter 

Source
Expand description

Supported upstream collections with governed memory and an explicit API.

Constructors preserve upstream initialization, panic and persisted-format contracts. These wrappers expose neither raw memory nor unrestricted upstream collections. Use distinct admitted allocations for owning collections. Region views retain a shared lease for disjoint application frames and reload roots per operation. Drop collections and all shared lease owners before reopening. IC Memory enforces one live lease per allocation within each runtime; hosts retain exclusive custody of the backing across runtimes.

Modules§

storable
Exact substrate interfaces for backing bounds and record codecs. Implementing Memory grants no allocation authority; constructors require committed RuntimeMemory leases. Explicit upstream storable identities used by the storage adapter.

Structs§

BTreeMapRegion
A B-tree view inside one existing, governed allocation lease.
BoundedCell
A stable cell whose writes enforce the record’s declared Storable bound.
StableBTreeMap
Governed upstream BTreeMap; initialization and failures follow upstream contracts.
StableBTreeSet
Governed upstream BTreeSet; initialization and failures follow upstream contracts.
StableCell
StableCell
StableLog
Governed upstream Log; initialization and failures follow upstream contracts.
StableMinHeap
Governed upstream MinHeap; initialization and failures follow upstream contracts.
StableVec
Governed upstream Vec; initialization and failures follow upstream contracts.

Enums§

Bound
Exact substrate interfaces for backing bounds and record codecs. Implementing Memory grants no allocation authority; constructors require committed RuntimeMemory leases. States whether the type’s size is bounded or unbounded.
LogWriteError
RegionGrowError
RegionGrowError

Traits§

Memory
Exact substrate interfaces for backing bounds and record codecs. Implementing Memory grants no allocation authority; constructors require committed RuntimeMemory leases. Abstraction over a WebAssembly-style linear memory (e.g., stable memory).
Storable
Exact substrate interfaces for backing bounds and record codecs. Implementing Memory grants no allocation authority; constructors require committed RuntimeMemory leases. A trait with convenience methods for storing an element into a stable structure.

Type Aliases§

LogIter
Upstream log iterator with governed index and data memories.
MapIter
Upstream map iterator with governed memory.
SetIter
Upstream set iterator with governed memory.