pub trait Balance {
type Num: Num + Unsigned<Signed = Self::Signed>;
type Signed;
// Required methods
fn long_amount(&self) -> Result<Self::Num>;
fn short_amount(&self) -> Result<Self::Num>;
}
Expand description
Balanced amounts.
Required Associated Types§
Required Methods§
Sourcefn long_amount(&self) -> Result<Self::Num>
fn long_amount(&self) -> Result<Self::Num>
Get the long token amount (when this is a token balance), or long usd value (when this is a usd value balance).
Sourcefn short_amount(&self) -> Result<Self::Num>
fn short_amount(&self) -> Result<Self::Num>
Get the short token amount (when this is a token balance), or short usd value (when this is a usd value balance).