Trait NativeStorage

Source
pub trait NativeStorage: Storage {
    // Required methods
    fn get_with_proof(&self, key: StorageKey) -> StorageProof<Self::Proof>;
    fn get_root_hash(&self, version: Version) -> Result<Self::Root, Error>;
}
Expand description

A Storage that is suitable for use in native execution environments (outside of the zkVM).

Required Methods§

Source

fn get_with_proof(&self, key: StorageKey) -> StorageProof<Self::Proof>

Returns the value corresponding to the key or None if key is absent and a proof to get the value.

Source

fn get_root_hash(&self, version: Version) -> Result<Self::Root, Error>

Get the root hash of the tree at the requested version

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§