Trait RestStateReader

Source
pub trait RestStateReader:
    ObjectStore
    + ReadStore
    + Send
    + Sync {
    // Required methods
    fn get_lowest_available_checkpoint_objects(
        &self,
    ) -> Result<CheckpointSequenceNumber>;
    fn get_chain_identifier(&self) -> Result<ChainIdentifier>;
    fn get_epoch_last_checkpoint(
        &self,
        epoch_id: EpochId,
    ) -> Result<Option<VerifiedCheckpoint>>;
    fn indexes(&self) -> Option<&dyn RestIndexes>;
}
Expand description

Trait used to provide functionality to the REST API service.

It extends both ObjectStore and ReadStore by adding functionality that may require more detailed underlying databases or indexes to support.

Required Methods§

Source

fn get_lowest_available_checkpoint_objects( &self, ) -> Result<CheckpointSequenceNumber>

Lowest available checkpoint for which object data can be requested.

Specifically this is the lowest checkpoint for which input/output object data will be available.

Source

fn get_chain_identifier(&self) -> Result<ChainIdentifier>

Source

fn get_epoch_last_checkpoint( &self, epoch_id: EpochId, ) -> Result<Option<VerifiedCheckpoint>>

Source

fn indexes(&self) -> Option<&dyn RestIndexes>

Implementors§