pub struct RiskParamsInput {Show 15 fields
pub warmup_period_slots: u64,
pub maintenance_margin_bps: u64,
pub initial_margin_bps: u64,
pub trading_fee_bps: u64,
pub max_accounts: u64,
pub new_account_fee: u64,
pub maintenance_fee_per_slot: u64,
pub max_crank_staleness_slots: u64,
pub liquidation_fee_bps: u64,
pub liquidation_fee_cap: u64,
pub min_liquidation_abs: u64,
pub min_initial_deposit: u64,
pub min_nonzero_mm_req: u64,
pub min_nonzero_im_req: u64,
pub insurance_floor: u64,
}Expand description
Anchor-friendly input for RiskParams (all primitives, no wrapper types).
Fields§
§warmup_period_slots: u64§maintenance_margin_bps: u64§initial_margin_bps: u64§trading_fee_bps: u64§max_accounts: u64§new_account_fee: u64§maintenance_fee_per_slot: u64§max_crank_staleness_slots: u64§liquidation_fee_bps: u64§liquidation_fee_cap: u64§min_liquidation_abs: u64§min_initial_deposit: u64§min_nonzero_mm_req: u64§min_nonzero_im_req: u64§insurance_floor: u64Implementations§
Source§impl RiskParamsInput
impl RiskParamsInput
pub fn to_risk_params(&self) -> RiskParams
Trait Implementations§
Source§impl BorshDeserialize for RiskParamsInput
impl BorshDeserialize for RiskParamsInput
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§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.
Source§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 BorshSerialize for RiskParamsInput
impl BorshSerialize for RiskParamsInput
Source§impl Clone for RiskParamsInput
impl Clone for RiskParamsInput
Source§fn clone(&self) -> RiskParamsInput
fn clone(&self) -> RiskParamsInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RiskParamsInput
impl RefUnwindSafe for RiskParamsInput
impl Send for RiskParamsInput
impl Sync for RiskParamsInput
impl Unpin for RiskParamsInput
impl UnsafeUnpin for RiskParamsInput
impl UnwindSafe for RiskParamsInput
Blanket Implementations§
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
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