Skip to main content

TierCacheApi

Trait TierCacheApi 

pub trait TierCacheApi: Send + Sync {
    // Required methods
    fn get_tier<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = Option<UserTierData>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_tier_record<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = Result<Option<UserTierRecord>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_existing_margin_mode<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = Result<Option<MarginMode>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn restore_tier_record<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
        previous_tier: Option<&'life2 UserTierRecord>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn set_tier<'life0, 'async_trait>(
        &'life0 self,
        new_tier: UserTierUpdate,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn delete_tier<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_margin_mode<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = Result<MarginMode, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_margin_mode_sync(
        &self,
        wallet: &WalletAddress,
    ) -> Result<MarginMode, Error>;
    fn set_margin_mode<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
        mode: MarginMode,
    ) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn apply_margin_mode_update<'life0, 'async_trait>(
        &'life0 self,
        wallet: WalletAddress,
        margin_mode: MarginMode,
        version: i64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_trading_limits(&self, wallet: &WalletAddress) -> TradingLimits;
    fn get_trading_limits_async<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = TradingLimits> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

fn get_tier<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, ) -> Pin<Box<dyn Future<Output = Option<UserTierData>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn get_tier_record<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, ) -> Pin<Box<dyn Future<Output = Result<Option<UserTierRecord>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn get_existing_margin_mode<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, ) -> Pin<Box<dyn Future<Output = Result<Option<MarginMode>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn restore_tier_record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, previous_tier: Option<&'life2 UserTierRecord>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

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

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

fn get_margin_mode<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, ) -> Pin<Box<dyn Future<Output = Result<MarginMode, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn get_margin_mode_sync( &self, wallet: &WalletAddress, ) -> Result<MarginMode, Error>

fn set_margin_mode<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, mode: MarginMode, ) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

fn apply_margin_mode_update<'life0, 'async_trait>( &'life0 self, wallet: WalletAddress, margin_mode: MarginMode, version: i64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

fn get_trading_limits(&self, wallet: &WalletAddress) -> TradingLimits

fn get_trading_limits_async<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 WalletAddress, ) -> Pin<Box<dyn Future<Output = TradingLimits> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Implementors§