ic-memory 0.30.0

Durable stable-memory allocation governance for Internet Computer canisters
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![deny(unused_must_use)]

use ic_memory::{AllocationBootstrap, AllocationPolicy, BootstrapError, DeclarationSnapshot};

fn discard<P: AllocationPolicy>(
    bootstrap: &mut AllocationBootstrap<'_>,
    declarations: DeclarationSnapshot,
    policy: &P,
) -> Result<(), BootstrapError<P::Error>> {
    bootstrap.validate_and_commit(declarations, policy)?;
    Ok(())
}

fn main() {}