BandwidthTicketProvider

Trait BandwidthTicketProvider 

Source
pub trait BandwidthTicketProvider: Send + Sync {
    // Required methods
    fn get_ecash_ticket<'life0, 'async_trait>(
        &'life0 self,
        ticket_type: TicketType,
        gateway_id: PublicKey,
        tickets_to_spend: u32,
    ) -> Pin<Box<dyn Future<Output = Result<PreparedCredential, BandwidthControllerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_upgrade_mode_token<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, BandwidthControllerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_ecash_ticket<'life0, 'async_trait>( &'life0 self, ticket_type: TicketType, gateway_id: PublicKey, tickets_to_spend: u32, ) -> Pin<Box<dyn Future<Output = Result<PreparedCredential, BandwidthControllerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Implementors§