Registry / database / ic-stable-structures

ic-stable-structures

JSON →
library0.7.2rscratesunverified

A collection of data structures for fearless canister upgrades on the Internet Computer.

# Cargo.toml [dependencies] ic-stable-structures = "0.7.2"
INSTALL
IMPORT
SIG · IC-STABLE-STRUCTUR
I
ic-stable-structures
databaserustv0.7.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StableBTreeMap
use ic_stable_structures::StableBTreeMap;

Creates a stable BTreeMap for persistent storage across canister upgrades.

use ic_stable_structures::{StableBTreeMap, DefaultMemoryImpl}; let mut map: StableBTreeMap<u64, String, DefaultMemoryImpl> = StableBTreeMap::init(DefaultMemoryImpl::default()); map.insert(1, "hello".to_string());
Debug
Known issues
gotchaRequires the ic-cdk environment; not usable outside Internet Computer canisters.
fix
Ensure your project targets an IC canister and includes ic-cdk.
affects: *
Upgrade
Version history
0.7.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
ic-stable-structures — cargo add ic-stable-structures · libregistry