#[repr(C)]pub struct Pool { /* private fields */ }
Expand description
A pool for market.
Trait Implementations§
Source§impl BorshDeserialize for Pool
impl BorshDeserialize for Pool
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<'de> Deserialize<'de> for Pool
impl<'de> Deserialize<'de> for Pool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Pool for Pool
impl Pool for Pool
impl Copy for Pool
impl Pod for Pool
Auto Trait Implementations§
impl Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnwindSafe for Pool
Blanket Implementations§
Source§impl<P> BalanceExt for P
impl<P> BalanceExt for P
Source§fn long_usd_value(&self, price: &Self::Num) -> Result<Self::Num, Error>
fn long_usd_value(&self, price: &Self::Num) -> Result<Self::Num, Error>
Get the long amount value in USD.
Source§fn short_usd_value(&self, price: &Self::Num) -> Result<Self::Num, Error>
fn short_usd_value(&self, price: &Self::Num) -> Result<Self::Num, Error>
Get the short amount value in USD.
Source§fn pool_delta_with_amounts(
&self,
long_token_delta_amount: &Self::Signed,
short_token_delta_amount: &Self::Signed,
long_token_price: &Self::Num,
short_token_price: &Self::Num,
) -> Result<PoolDelta<Self::Num>, Error>
fn pool_delta_with_amounts( &self, long_token_delta_amount: &Self::Signed, short_token_delta_amount: &Self::Signed, long_token_price: &Self::Num, short_token_price: &Self::Num, ) -> Result<PoolDelta<Self::Num>, Error>
Get pool value information after applying delta.
Source§fn pool_delta_with_values(
&self,
delta_long_token_usd_value: Self::Signed,
delta_short_token_usd_value: Self::Signed,
long_token_price: &Self::Num,
short_token_price: &Self::Num,
) -> Result<PoolDelta<Self::Num>, Error>
fn pool_delta_with_values( &self, delta_long_token_usd_value: Self::Signed, delta_short_token_usd_value: Self::Signed, long_token_price: &Self::Num, short_token_price: &Self::Num, ) -> Result<PoolDelta<Self::Num>, Error>
Get pool value information after applying delta.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more