Skip to main content

StateCertPersistence

Trait StateCertPersistence 

Source
pub trait StateCertPersistence:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_state_cert_by_epoch<'life0, 'async_trait>(
        &'life0 self,
        epoch: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<LightClientStateUpdateCertificateV2<SeqTypes>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn insert_state_cert<'life0, 'async_trait>(
        &'life0 self,
        epoch: u64,
        cert: LightClientStateUpdateCertificateV2<SeqTypes>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

State certificates by epoch, apart from SequencerPersistence so that the API can hold them as a trait object.

Required Methods§

Source

fn get_state_cert_by_epoch<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<LightClientStateUpdateCertificateV2<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a state certificate for an epoch.

Source

fn insert_state_cert<'life0, 'async_trait>( &'life0 self, epoch: u64, cert: LightClientStateUpdateCertificateV2<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Insert a state certificate for a given epoch.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§