pub trait FromReceiptReader<D> {
    type Error: From<Error>;

    // Required methods
    fn decoder() -> D;
    fn from_receipt_reader<B>(
        reader: B,
        num_bytes: u64,
        prev_chunk_highest_block: Option<u64>,
    ) -> impl Future<Output = Result<DecodedFileChunk<Self>, Self::Error>>
       where Self: Sized,
             B: AsyncReadExt + Unpin;
}
Expand description

Constructs a file client from a reader and decoder.

Required Associated Types§

source

type Error: From<Error>

Error returned by file client type.

Required Methods§

source

fn decoder() -> D

Returns a decoder instance

source

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

Returns a file client

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<D> FromReceiptReader<D> for ReceiptFileClient<D>
where D: Decoder<Item = Option<ReceiptWithBlockNumber>, Error = FileClientError> + Debug + Default,

source§

type Error = <D as Decoder>::Error