Skip to main content

StateRead

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§