pub trait StageCheckpointReader: Send {
// Required methods
fn get_stage_checkpoint(
&self,
id: StageId,
) -> Result<Option<StageCheckpoint>, ProviderError>;
fn get_stage_checkpoint_progress(
&self,
id: StageId,
) -> Result<Option<Vec<u8>>, ProviderError>;
fn get_all_checkpoints(
&self,
) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>;
}Expand description
The trait for fetching stage checkpoint related data.
Required Methods§
Sourcefn get_stage_checkpoint(
&self,
id: StageId,
) -> Result<Option<StageCheckpoint>, ProviderError>
fn get_stage_checkpoint( &self, id: StageId, ) -> Result<Option<StageCheckpoint>, ProviderError>
Fetch the checkpoint for the given stage.
Sourcefn get_stage_checkpoint_progress(
&self,
id: StageId,
) -> Result<Option<Vec<u8>>, ProviderError>
fn get_stage_checkpoint_progress( &self, id: StageId, ) -> Result<Option<Vec<u8>>, ProviderError>
Get stage checkpoint progress.
Sourcefn get_all_checkpoints(
&self,
) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>
fn get_all_checkpoints( &self, ) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>
Reads all stage checkpoints and returns a list with the name of the stage and the checkpoint data.
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> StageCheckpointReader for &'a T
impl<'a, T> StageCheckpointReader for &'a T
fn get_stage_checkpoint( &self, id: StageId, ) -> Result<Option<StageCheckpoint>, ProviderError>
fn get_stage_checkpoint_progress( &self, id: StageId, ) -> Result<Option<Vec<u8>>, ProviderError>
fn get_all_checkpoints( &self, ) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>
Source§impl<T> StageCheckpointReader for Arc<T>
impl<T> StageCheckpointReader for Arc<T>
fn get_stage_checkpoint( &self, id: StageId, ) -> Result<Option<StageCheckpoint>, ProviderError>
fn get_stage_checkpoint_progress( &self, id: StageId, ) -> Result<Option<Vec<u8>>, ProviderError>
fn get_all_checkpoints( &self, ) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>
Implementors§
impl<C, N> StageCheckpointReader for NoopProvider<C, N>
impl<N: ProviderNodeTypes> StageCheckpointReader for BlockchainProvider<N>
impl<N: ProviderNodeTypes> StageCheckpointReader for ProviderFactory<N>
impl<T: NodePrimitives, ChainSpec: Send + Sync> StageCheckpointReader for MockEthProvider<T, ChainSpec>
Available on crate features
test-utils only.