[][src]Trait blockchain::traits::StorageExternalities

pub trait StorageExternalities<Error> {
    fn read_storage(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error>;
fn write_storage(&mut self, key: Vec<u8>, value: Vec<u8>);
fn remove_storage(&mut self, key: &[u8]); }

Externalities for reading a key value based storage.

Required methods

fn read_storage(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error>

Read storage value.

fn write_storage(&mut self, key: Vec<u8>, value: Vec<u8>)

Write storage value.

fn remove_storage(&mut self, key: &[u8])

Remove storage value.

Loading content...

Trait Implementations

impl AsExternalities<dyn StorageExternalities<Infallible> + 'static> for KeyValueMemoryState[src]

impl AsExternalities<dyn StorageExternalities<Box<dyn Error + 'static>> + 'static> for KeyValueMemoryState[src]

Implementors

impl StorageExternalities<Infallible> for KeyValueMemoryState[src]

impl StorageExternalities<Box<dyn Error + 'static>> for KeyValueMemoryState[src]

Loading content...