Module stable

Source
Expand description

APIs to manage stable memory.

You can check the Internet Computer Specification for a in-depth explanation of stable memory.

Structs§

BufferedStableReader
A reader to the stable memory which reads bytes a chunk at a time as each chunk is required.
BufferedStableWriter
A writer to the stable memory which first writes the bytes to an in memory buffer and flushes the buffer to stable memory each time it becomes full.
CanisterStableMemory
A standard implementation of StableMemory.
StableIO
Performs generic IO (read, write, and seek) on stable memory.
StableReader
Keeps an offset and reads off stable memory consecutively.
StableWriter
A writer to the stable memory.

Enums§

StableMemoryError
A possible error value when dealing with stable memory.

Constants§

WASM_PAGE_SIZE_IN_BYTES
WASM page size in bytes.

Traits§

StableMemory
A trait defining the stable memory API which each canister running on the IC can make use of

Functions§

stable_bytes
Returns a copy of the stable memory.
stable_grow
Attempts to grow the stable memory by new_pages (added pages).
stable_read
Reads data from the stable memory location specified by an offset.
stable_size
Gets current size of the stable memory (in WASM pages).
stable_write
Writes data to the stable memory location specified by an offset.