Trait LedgerStorageAdapter

Source
pub trait LedgerStorageAdapter: Send + Sync {
    // Required methods
    fn get_first_available_block<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Slot>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_confirmed_blocks<'life0, 'async_trait>(
        &'life0 self,
        start_slot: Slot,
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Slot>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_confirmed_block<'life0, 'async_trait>(
        &'life0 self,
        slot: Slot,
        use_cache: bool,
    ) -> Pin<Box<dyn Future<Output = Result<ConfirmedBlock>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_signature_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signature: &'life1 Signature,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_full_transaction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signature: &'life1 Signature,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ConfirmedTransactionWithStatusMeta>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_confirmed_transaction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signature: &'life1 Signature,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ConfirmedTransactionWithStatusMeta>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_confirmed_signatures_for_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        address: &'life1 Pubkey,
        before_signature: Option<&'life2 Signature>,
        until_signature: Option<&'life3 Signature>,
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<(ConfirmedTransactionStatusWithSignature, u32)>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn get_latest_stored_slot<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Slot>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn clone_box(&self) -> Box<dyn LedgerStorageAdapter>;
}

Required Methods§

Source

fn get_first_available_block<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Slot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_confirmed_blocks<'life0, 'async_trait>( &'life0 self, start_slot: Slot, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Slot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_confirmed_block<'life0, 'async_trait>( &'life0 self, slot: Slot, use_cache: bool, ) -> Pin<Box<dyn Future<Output = Result<ConfirmedBlock>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_signature_status<'life0, 'life1, 'async_trait>( &'life0 self, signature: &'life1 Signature, ) -> Pin<Box<dyn Future<Output = Result<TransactionStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_full_transaction<'life0, 'life1, 'async_trait>( &'life0 self, signature: &'life1 Signature, ) -> Pin<Box<dyn Future<Output = Result<Option<ConfirmedTransactionWithStatusMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_confirmed_transaction<'life0, 'life1, 'async_trait>( &'life0 self, signature: &'life1 Signature, ) -> Pin<Box<dyn Future<Output = Result<Option<ConfirmedTransactionWithStatusMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_confirmed_signatures_for_address<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, address: &'life1 Pubkey, before_signature: Option<&'life2 Signature>, until_signature: Option<&'life3 Signature>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<(ConfirmedTransactionStatusWithSignature, u32)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_latest_stored_slot<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Slot>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn clone_box(&self) -> Box<dyn LedgerStorageAdapter>

Implementors§