Skip to main content

EraBlockReader

Trait EraBlockReader 

Source
pub trait EraBlockReader<BH, BB, R> {
    // Required method
    fn blocks<M: EraMeta + ?Sized>(
        meta: &M,
        decode_receipts: bool,
    ) -> Result<impl Iterator<Item = Result<(BH, BB, Option<Vec<R>>)>>>;
}
Expand description

Reads execution (header, body, receipts) tuples out of an ERA file.

receipts is None when decode_receipts is false, or the file has none (.era never does; .ere receipts are optional). decode_receipts = false skips decoding entirely.

Per-format seam of the import pipeline.

Required Methods§

Source

fn blocks<M: EraMeta + ?Sized>( meta: &M, decode_receipts: bool, ) -> Result<impl Iterator<Item = Result<(BH, BB, Option<Vec<R>>)>>>

Opens the ERA file at meta and iterates its execution blocks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<BH, BB, R> EraBlockReader<BH, BB, R> for Era1
where BH: FullBlockHeader + Value, BB: FullBlockBody<OmmerHeader = BH>, R: RlpDecodableReceipt,

Source§

impl<BH, BB, R> EraBlockReader<BH, BB, R> for Era
where BH: FullBlockHeader, BB: FullBlockBody,

Source§

impl<BH, BB, R> EraBlockReader<BH, BB, R> for Ere
where BH: FullBlockHeader + Value, BB: FullBlockBody<OmmerHeader = BH>, R: RlpDecodableReceipt,