Database

Trait Database 

Source
pub trait Database<Error>:
    QuotesDatabase<Err = Error>
    + ProofsDatabase<Err = Error>
    + SignaturesDatabase<Err = Error> {
    // Required methods
    fn begin_transaction<'a, 'async_trait>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Transaction<'a, Error> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn get_mint_info<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<MintInfo, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_quote_ttl<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<QuoteTTL, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Mint Database trait

Required Methods§

Source

fn begin_transaction<'a, 'async_trait>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Transaction<'a, Error> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Beings a transaction

Source

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

Source

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

Implementors§