swarm_nl::core::sharding

Trait ShardStorage

Source
pub trait ShardStorage:
    Send
    + Sync
    + Debug {
    // Required method
    fn fetch_data(&mut self, key: ByteVector) -> ByteVector;
}
Expand description

Trait that interfaces with the storage layer of a node in a shard. It is important for handling forwarded data requests. This is a mechanism to trap into the application storage layer to read sharded data.

Required Methods§

Source

fn fetch_data(&mut self, key: ByteVector) -> ByteVector

Implementors§