Trait ciruela::index::GetIndex
[−]
[src]
pub trait GetIndex { type Data: AsRef<[u8]>; type Error: Display; type Future: Future<Item = Self::Data, Error = Self::Error> + 'static; fn read_index(&self, id: &ImageId) -> Self::Future; }
A trait to fulfill index data when uploading
Associated Types
type Data: AsRef<[u8]>
An index data returned
It's usually Vec<u8>
but may also be an Arc'd container or a
memory-mapped region.
type Error: Display
Error returned by future
This is used to print error and to send message to remote system
type Future: Future<Item = Self::Data, Error = Self::Error> + 'static
Future returned by read_block
Required Methods
fn read_index(&self, id: &ImageId) -> Self::Future
Read block by hash