Skip to main content

Storage

Trait Storage 

Source
pub trait Storage {
    // Required methods
    fn get(&self, cid: &Cid<64>) -> Block;
    fn set(&mut self, block: Block) -> Cid<64>;
}
Expand description

Storage interface.

Required Methods§

Source

fn get(&self, cid: &Cid<64>) -> Block

Returns a block from storage.

Source

fn set(&mut self, block: Block) -> Cid<64>

Inserts a block into storage.

Implementors§