mithril_aggregator::database::repository

Trait SignedEntityStorer

source
pub trait SignedEntityStorer: Sync + Send {
    // Required methods
    fn store_signed_entity<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signed_entity: &'life1 SignedEntityRecord,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_signed_entity<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signed_entity_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignedEntityRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_signed_entity_by_certificate_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        certificate_hash: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignedEntityRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_signed_entities_by_certificates_ids<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        certificates_ids: &'life1 [&'a str],
    ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignedEntityRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_last_signed_entities_by_type<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signed_entity_type_id: &'life1 SignedEntityTypeDiscriminants,
        total: usize,
    ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignedEntityRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_cardano_stake_distribution_signed_entity_by_epoch<'life0, 'async_trait>(
        &'life0 self,
        epoch: Epoch,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignedEntityRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_signed_entities<'life0, 'async_trait>(
        &'life0 self,
        signed_entities: Vec<SignedEntityRecord>,
    ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignedEntityRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Signed entity storer trait

Required Methods§

source

fn store_signed_entity<'life0, 'life1, 'async_trait>( &'life0 self, signed_entity: &'life1 SignedEntityRecord, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Store a signed entity

source

fn get_signed_entity<'life0, 'life1, 'async_trait>( &'life0 self, signed_entity_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignedEntityRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get signed entity type

source

fn get_signed_entity_by_certificate_id<'life0, 'life1, 'async_trait>( &'life0 self, certificate_hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignedEntityRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get signed entity type by certificate id

source

fn get_signed_entities_by_certificates_ids<'a, 'life0, 'life1, 'async_trait>( &'life0 self, certificates_ids: &'life1 [&'a str], ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignedEntityRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get signed entities type by certificates ids

source

fn get_last_signed_entities_by_type<'life0, 'life1, 'async_trait>( &'life0 self, signed_entity_type_id: &'life1 SignedEntityTypeDiscriminants, total: usize, ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignedEntityRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get last signed entities by signed entity type

source

fn get_cardano_stake_distribution_signed_entity_by_epoch<'life0, 'async_trait>( &'life0 self, epoch: Epoch, ) -> Pin<Box<dyn Future<Output = StdResult<Option<SignedEntityRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get Cardano stake distribution signed entity by epoch

source

fn update_signed_entities<'life0, 'async_trait>( &'life0 self, signed_entities: Vec<SignedEntityRecord>, ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignedEntityRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform an update for all the given signed entities.

Implementors§