reth_storage_api

Trait PruneCheckpointReader

Source
pub trait PruneCheckpointReader: Send + Sync {
    // Required methods
    fn get_prune_checkpoint(
        &self,
        segment: PruneSegment,
    ) -> ProviderResult<Option<PruneCheckpoint>>;
    fn get_prune_checkpoints(
        &self,
    ) -> ProviderResult<Vec<(PruneSegment, PruneCheckpoint)>>;
}
Expand description

The trait for fetching prune checkpoint related data.

Required Methods§

Source

fn get_prune_checkpoint( &self, segment: PruneSegment, ) -> ProviderResult<Option<PruneCheckpoint>>

Fetch the prune checkpoint for the given segment.

Source

fn get_prune_checkpoints( &self, ) -> ProviderResult<Vec<(PruneSegment, PruneCheckpoint)>>

Fetch all the prune checkpoints.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + PruneCheckpointReader + ?Sized> PruneCheckpointReader for &'a T
where &'a T: Send + Sync,

Source§

fn get_prune_checkpoint( &self, segment: PruneSegment, ) -> ProviderResult<Option<PruneCheckpoint>>

Source§

fn get_prune_checkpoints( &self, ) -> ProviderResult<Vec<(PruneSegment, PruneCheckpoint)>>

Source§

impl<T: PruneCheckpointReader + ?Sized> PruneCheckpointReader for Arc<T>
where Arc<T>: Send + Sync,

Source§

fn get_prune_checkpoint( &self, segment: PruneSegment, ) -> ProviderResult<Option<PruneCheckpoint>>

Source§

fn get_prune_checkpoints( &self, ) -> ProviderResult<Vec<(PruneSegment, PruneCheckpoint)>>

Implementors§

Source§

impl<C: Send + Sync, N: NodePrimitives> PruneCheckpointReader for NoopProvider<C, N>