Trait reth_downloaders::file_client::FromReader

source ·
pub trait FromReader {
    type Error: From<Error>;

    // Required method
    fn from_reader<B>(
        reader: B,
        num_bytes: u64,
    ) -> impl Future<Output = Result<DecodedFileChunk<Self>, Self::Error>>
       where Self: Sized,
             B: AsyncReadExt + Unpin;
}
Expand description

Constructs a file client from a reader.

Required Associated Types§

source

type Error: From<Error>

Error returned by file client type.

Required Methods§

source

fn from_reader<B>( reader: B, num_bytes: u64, ) -> impl Future<Output = Result<DecodedFileChunk<Self>, Self::Error>>
where Self: Sized, B: AsyncReadExt + Unpin,

Returns a file client

Implementors§