[][src]Trait cosmwasm_std::ReadonlyStorage

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

ReadonlyStorage is access to the contracts persistent data store

Required methods

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

Returns None when key does not exist. Returns 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...


impl ReadonlyStorage for MemoryStorage[src]

Loading content...