Trait oasis_contract_sdk::storage::Store

source ·
pub trait Store {
    // Required methods
    fn get(&self, key: &[u8]) -> Option<Vec<u8>>;
    fn insert(&mut self, key: &[u8], value: &[u8]);
    fn remove(&mut self, key: &[u8]);
}
Expand description

Key/value store trait.

Required Methods§

source

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

Fetch a given key from contract storage.

source

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

Insert a given key/value pair into contract storage.

source

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

Remove a given key from contract storage.

Implementors§