Trait ciruela::blocks::GetBlock [] [src]

pub trait GetBlock {
    type Data: AsRef<[u8]>;
    type Error: Display;
    type Future: Future<Item = Self::Data, Error = Self::Error> + 'static;
    fn read_block(&self, hash: BlockHash, hint: BlockHint) -> Self::Future;
}

A trait to fulfill block reading when uploading

Associated Types

A block data returned

It's usually Vec<u8> but may also be an Arc'd container or a memory-mapped region.

Error returned by future

This is used to print error and to send message to remote system

Future returned by read_block

Required Methods

Read block by hash

Implementors