Skip to main content

Storage

Trait Storage 

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

Storage interface.

Required Methods§

Source

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

Returns a block from storage.

Source

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

Inserts a block into storage.

Implementors§