Skip to main content

ReadStore

Trait ReadStore 

Source
pub trait ReadStore {
    // Required methods
    fn get_events<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject_id: &'life1 str,
        query: EventsQuery,
    ) -> Pin<Box<dyn Future<Output = Result<PaginatorEvents, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_aborts<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject_id: &'life1 str,
        query: AbortsQuery,
    ) -> Pin<Box<dyn Future<Output = Result<PaginatorAborts, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_event_sn<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject_id: &'life1 str,
        sn: u64,
    ) -> Pin<Box<dyn Future<Output = Result<LedgerDB, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_first_or_end_events<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject_id: &'life1 str,
        quantity: Option<u64>,
        reverse: Option<bool>,
        event_type: Option<EventRequestType>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerDB>, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_subject_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<SubjectDB, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_governances<'life0, 'async_trait>(
        &'life0 self,
        active: Option<bool>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<GovsData>, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_subjects<'life0, 'life1, 'async_trait>(
        &'life0 self,
        governance_id: &'life1 str,
        active: Option<bool>,
        schema_id: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SubjsData>, DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn get_events<'life0, 'life1, 'async_trait>( &'life0 self, subject_id: &'life1 str, query: EventsQuery, ) -> Pin<Box<dyn Future<Output = Result<PaginatorEvents, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_aborts<'life0, 'life1, 'async_trait>( &'life0 self, subject_id: &'life1 str, query: AbortsQuery, ) -> Pin<Box<dyn Future<Output = Result<PaginatorAborts, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_event_sn<'life0, 'life1, 'async_trait>( &'life0 self, subject_id: &'life1 str, sn: u64, ) -> Pin<Box<dyn Future<Output = Result<LedgerDB, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_first_or_end_events<'life0, 'life1, 'async_trait>( &'life0 self, subject_id: &'life1 str, quantity: Option<u64>, reverse: Option<bool>, event_type: Option<EventRequestType>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerDB>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_subject_state<'life0, 'life1, 'async_trait>( &'life0 self, subject_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<SubjectDB, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_governances<'life0, 'async_trait>( &'life0 self, active: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Vec<GovsData>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_subjects<'life0, 'life1, 'async_trait>( &'life0 self, governance_id: &'life1 str, active: Option<bool>, schema_id: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SubjsData>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§