[][src]Trait cosmwasm_std::ReadonlyStorage

pub trait ReadonlyStorage {
    fn get(&self, key: &[u8]) -> StdResult<Option<Vec<u8>>>;
}

ReadonlyStorage is access to the contracts persistent data store

Required methods

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

Returns Err on error. Returns Ok(None) when key does not exist. Returns Ok(Some(Vec)) when key exists.

Note: Support for differentiating between a non-existent key and a key with empty value is not great yet and might not be possible in all backends. But we're trying to get there.

Loading content...

Implementors

impl ReadonlyStorage for MemoryStorage[src]

Loading content...