Skip to main content

PruneCheckpointReader

Trait PruneCheckpointReader 

Source
pub trait PruneCheckpointReader: Send {
    // Required methods
    fn get_prune_checkpoint(
        &self,
        segment: PruneSegment,
    ) -> Result<Option<PruneCheckpoint>, ProviderError>;
    fn get_prune_checkpoints(
        &self,
    ) -> Result<Vec<(PruneSegment, PruneCheckpoint)>, ProviderError>;

    // Provided method
    fn get_prune_checkpoints_for_availability(
        &self,
    ) -> Result<Vec<(PruneSegment, PruneCheckpoint)>, ProviderError> { ... }
}
Available on crate feature storage-api only.
Expand description

The trait for fetching prune checkpoint related data.

Required Methods§

Source

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

Fetch the prune checkpoint for the given segment.

Source

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

Fetch all the prune checkpoints.

Provided Methods§

Source

fn get_prune_checkpoints_for_availability( &self, ) -> Result<Vec<(PruneSegment, PruneCheckpoint)>, ProviderError>

Fetch checkpoints for reporting data availability, accounting for data still retained in other storage backends. This does not modify the stored checkpoints.

The default returns the stored checkpoints. Implementations may lower their block and transaction numbers when continuous coverage can be verified, preserving the prune mode. Use Self::get_prune_checkpoints for pruning progress instead.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, T> PruneCheckpointReader for &'a T

Source§

impl<T> PruneCheckpointReader for Arc<T>

Implementors§