Trait Memory

Source
pub trait Memory {
    // Required methods
    fn destructible(&self, addr: CellAddr) -> Option<StateCell>;
    fn immutable(&self, addr: CellAddr) -> Option<StateValue>;
}
Expand description

The trait, which must be implemented by a client library for a structure providing access to the valid and most recent contract state, consisting of two parts: destructible (also called read-once, or owned) and immutable (also called read-only, append-only or global).

Required Methods§

Source

fn destructible(&self, addr: CellAddr) -> Option<StateCell>

Read a destructible memory cell created by a specific operation read-once output, which is defined as a part of [Operation::destructible].

Source

fn immutable(&self, addr: CellAddr) -> Option<StateValue>

Read an immutable memory cell created by a specific operation immutable output, which is defined as a part of [Operation::immutable].

Implementors§