Trait iroh_blobs::downloader::Getter

source ·
pub trait Getter {
    type Connection;

    // Required method
    fn get(
        &mut self,
        kind: DownloadKind,
        conn: Self::Connection,
        progress_sender: BroadcastProgressSender
    ) -> BoxedLocal<Result<Stats, FailureAction>>;
}
Expand description

Trait modelling performing a single request over a connection. This allows for IO-less testing.

Required Associated Types§

source

type Connection

Type of connections the Getter requires to perform a download.

Required Methods§

source

fn get( &mut self, kind: DownloadKind, conn: Self::Connection, progress_sender: BroadcastProgressSender ) -> BoxedLocal<Result<Stats, FailureAction>>

Return a future that performs the download using the given connection.

Implementors§