Trait tetsy_hash_fetch::HashFetch[][src]

pub trait HashFetch: Send + Sync + 'static {
    fn fetch(
        &self,
        hash: H256,
        abort: Abort,
        on_done: Box<dyn Fn(Result<PathBuf, Error>) + Send>
    ); }

API for fetching by hash.

Required methods

fn fetch(
    &self,
    hash: H256,
    abort: Abort,
    on_done: Box<dyn Fn(Result<PathBuf, Error>) + Send>
)
[src]

Fetch hash-addressed content. Parameters:

  1. hash - content hash
  2. on_done - callback function invoked when the content is ready (or there was error during fetch)

This function may fail immediately when fetch cannot be initialized or content cannot be resolved.

Loading content...

Implementors

impl<F: Fetch + 'static> HashFetch for Client<F>[src]

Loading content...