pub struct EngineSnapshot {Show 14 fields
pub vault: u128,
pub insurance_fund: u128,
pub haircut_numerator: u128,
pub haircut_denominator: u128,
pub conservation: bool,
pub current_slot: u64,
pub last_oracle_price: u64,
pub last_funding_rate: i64,
pub side_mode_long: String,
pub side_mode_short: String,
pub oi_long_q: u128,
pub oi_short_q: u128,
pub lifetime_liquidations: u64,
pub accounts: Vec<AccountSnapshot>,
}Expand description
Complete serializable snapshot of the engine state.
Fields§
§vault: u128§insurance_fund: u128§haircut_numerator: u128§haircut_denominator: u128§conservation: bool§current_slot: u64§last_oracle_price: u64§last_funding_rate: i64§side_mode_long: String§side_mode_short: String§oi_long_q: u128§oi_short_q: u128§lifetime_liquidations: u64§accounts: Vec<AccountSnapshot>Implementations§
Source§impl EngineSnapshot
impl EngineSnapshot
pub fn haircut_ratio_f64(&self) -> f64
Trait Implementations§
Source§impl Clone for EngineSnapshot
impl Clone for EngineSnapshot
Source§fn clone(&self) -> EngineSnapshot
fn clone(&self) -> EngineSnapshot
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 moreSource§impl Debug for EngineSnapshot
impl Debug for EngineSnapshot
Source§impl<'de> Deserialize<'de> for EngineSnapshot
impl<'de> Deserialize<'de> for EngineSnapshot
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
Auto Trait Implementations§
impl Freeze for EngineSnapshot
impl RefUnwindSafe for EngineSnapshot
impl Send for EngineSnapshot
impl Sync for EngineSnapshot
impl Unpin for EngineSnapshot
impl UnsafeUnpin for EngineSnapshot
impl UnwindSafe for EngineSnapshot
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