Skip to main content

ic_memory

Macro ic_memory 

Source
macro_rules! ic_memory {
    ($label:path, $id:expr) => { ... };
}
Expand description

Declare a stable-memory slot backed by the Canic memory registry.

The macro enqueues a registration for lifecycle bootstrap validation and immediately returns the VirtualMemory handle so callers can wrap it in Cell, BTreeMap, and other structures. Memory IDs are automatically namespaced per crate via CARGO_PKG_NAME.