Trait TierCacheApi
Source 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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_tier_record<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<UserTierRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_existing_margin_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<MarginMode>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn set_tier<'life0, 'async_trait>(
&'life0 self,
new_tier: UserTierUpdate,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_tier<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_margin_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<MarginMode>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_margin_mode_sync(&self, wallet: &WalletAddress) -> Result<MarginMode>;
fn set_margin_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
mode: MarginMode,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 Self: 'async_trait,
'life0: '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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}