reth_static_file::segments

Trait Segment

Source
pub trait Segment<Provider: StaticFileProviderFactory>: Send + Sync {
    // Required methods
    fn segment(&self) -> StaticFileSegment;
    fn copy_to_static_files(
        &self,
        provider: Provider,
        block_range: RangeInclusive<BlockNumber>,
    ) -> ProviderResult<()>;
}
Expand description

A segment represents moving some portion of the data to static files.

Required Methods§

Source

fn segment(&self) -> StaticFileSegment

Returns the StaticFileSegment.

Source

fn copy_to_static_files( &self, provider: Provider, block_range: RangeInclusive<BlockNumber>, ) -> ProviderResult<()>

Move data to static files for the provided block range. StaticFileProvider will handle the management of and writing to files.

Implementors§

Source§

impl<Provider> Segment<Provider> for Headers
where Provider: StaticFileProviderFactory<Primitives: NodePrimitives<BlockHeader: Compact + Value>> + DBProvider,

Source§

impl<Provider> Segment<Provider> for Receipts
where Provider: StaticFileProviderFactory<Primitives: NodePrimitives<Receipt: Value + Compact>> + DBProvider + BlockReader,

Source§

impl<Provider> Segment<Provider> for Transactions
where Provider: StaticFileProviderFactory<Primitives: NodePrimitives<SignedTx: Value + Compact>> + DBProvider + BlockReader,