Trait StateRead

Source
pub trait StateRead: Send + Sync {
    type Error: Debug + Display;

    // Required method
    fn key_range(
        &self,
        contract_addr: ContentAddress,
        key: Key,
        num_values: usize,
    ) -> Result<Vec<Vec<Word>>, Self::Error>;
}
Expand description

Read-only access to state required by the VM.

Required Associated Types§

Source

type Error: Debug + Display

An error type describing any cases that might occur during state reading.

Required Methods§

Source

fn key_range( &self, contract_addr: ContentAddress, key: Key, num_values: usize, ) -> Result<Vec<Vec<Word>>, Self::Error>

Read the given number of values from state at the given key associated with the given contract address.

Implementors§