Trait QuotesTransaction

Source
pub trait QuotesTransaction<'a> {
    type Err: Into<Error> + From<Error>;

    // Required methods
    fn get_mint_quote<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn add_or_replace_mint_quote<'life0, 'async_trait>(
        &'life0 mut self,
        quote: MintMintQuote,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_mint_quote_state<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
        state: MintQuoteState,
    ) -> Pin<Box<dyn Future<Output = Result<MintQuoteState, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_mint_quote<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_melt_quote<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<MeltQuote>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn add_melt_quote<'life0, 'async_trait>(
        &'life0 mut self,
        quote: MeltQuote,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_melt_quote_request_lookup_id<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
        new_request_lookup_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn update_melt_quote_state<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
        new_state: MeltQuoteState,
    ) -> Pin<Box<dyn Future<Output = Result<(MeltQuoteState, MeltQuote), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_melt_quote<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        quote_id: &'life1 Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_mint_quote_by_request<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        request: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Mint Quote Database writer trait

Required Associated Types§

Source

type Err: Into<Error> + From<Error>

Mint Quotes Database Error

Required Methods§

Source

fn get_mint_quote<'life0, 'life1, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get MintMintQuote and lock it for update in this transaction

Source

fn add_or_replace_mint_quote<'life0, 'async_trait>( &'life0 mut self, quote: MintMintQuote, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_mint_quote_state<'life0, 'life1, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, state: MintQuoteState, ) -> Pin<Box<dyn Future<Output = Result<MintQuoteState, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update state of MintMintQuote

Source

fn remove_mint_quote<'life0, 'life1, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_melt_quote<'life0, 'life1, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<MeltQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get mint::MeltQuote and lock it for update in this transaction

Source

fn add_melt_quote<'life0, 'async_trait>( &'life0 mut self, quote: MeltQuote, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_melt_quote_request_lookup_id<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, new_request_lookup_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Updates the request lookup id for a melt quote

Source

fn update_melt_quote_state<'life0, 'life1, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, new_state: MeltQuoteState, ) -> Pin<Box<dyn Future<Output = Result<(MeltQuoteState, MeltQuote), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update mint::MeltQuote state

It is expected for this function to fail if the state is already set to the new state

Source

fn remove_melt_quote<'life0, 'life1, 'async_trait>( &'life0 mut self, quote_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_mint_quote_by_request<'life0, 'life1, 'async_trait>( &'life0 mut self, request: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<MintMintQuote>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all MintMintQuotes and lock it for update in this transaction

Implementors§