Struct port_variable_rate_lending_instructions::state::CollateralExchangeRate [−][src]
pub struct CollateralExchangeRate(pub Rate);
Expand description
Collateral exchange rate
Tuple Fields
0: Rate
Implementations
Convert reserve collateral to liquidity
pub fn decimal_collateral_to_liquidity(
&self,
collateral_amount: Decimal
) -> Result<Decimal, ProgramError>
pub fn decimal_collateral_to_liquidity(
&self,
collateral_amount: Decimal
) -> Result<Decimal, ProgramError>
Convert reserve collateral to liquidity
Convert reserve liquidity to collateral
pub fn decimal_liquidity_to_collateral(
&self,
liquidity_amount: Decimal
) -> Result<Decimal, ProgramError>
pub fn decimal_liquidity_to_collateral(
&self,
liquidity_amount: Decimal
) -> Result<Decimal, ProgramError>
Convert reserve liquidity to collateral
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for CollateralExchangeRate
impl Send for CollateralExchangeRate
impl Sync for CollateralExchangeRate
impl Unpin for CollateralExchangeRate
impl UnwindSafe for CollateralExchangeRate
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more