Trait LiquidityMarketMutExt

Source
pub trait LiquidityMarketMutExt<const DECIMALS: u8>: LiquidityMarketMut<DECIMALS> {
    // Provided methods
    fn deposit(
        &mut self,
        long_token_amount: Self::Num,
        short_token_amount: Self::Num,
        prices: Prices<Self::Num>,
    ) -> Result<Deposit<&mut Self, DECIMALS>, Error>
       where Self: Sized { ... }
    fn withdraw(
        &mut self,
        market_token_amount: Self::Num,
        prices: Prices<Self::Num>,
    ) -> Result<Withdrawal<&mut Self, DECIMALS>>
       where Self: Sized { ... }
}
Expand description

Extension trait of LiquidityMarketMut.

Provided Methods§

Source

fn deposit( &mut self, long_token_amount: Self::Num, short_token_amount: Self::Num, prices: Prices<Self::Num>, ) -> Result<Deposit<&mut Self, DECIMALS>, Error>
where Self: Sized,

Create a Deposit action.

Source

fn withdraw( &mut self, market_token_amount: Self::Num, prices: Prices<Self::Num>, ) -> Result<Withdrawal<&mut Self, DECIMALS>>
where Self: Sized,

Create a Withdrawal.

Implementors§

Source§

impl<M: LiquidityMarketMut<DECIMALS>, const DECIMALS: u8> LiquidityMarketMutExt<DECIMALS> for M