Struct ChainState
pub struct ChainState { /* private fields */ }Implementations§
§impl ChainState
impl ChainState
pub fn from_snapshot(snapshot: ChainSnapshot) -> Result<Self, FerroRiskError>
pub fn from_snapshot(snapshot: ChainSnapshot) -> Result<Self, FerroRiskError>
pub fn metadata(&self) -> &ChainMetadata
pub fn contract_count(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contract( &self, contract_id: ChainContractId, ) -> Option<&ChainContractSnapshot>
pub fn contracts(&self) -> impl Iterator<Item = &ChainContractSnapshot>
pub fn contracts(&self) -> impl Iterator<Item = &ChainContractSnapshot>
pub fn expiry_revision(
&self,
expiry: f64,
) -> Result<Option<u64>, FerroRiskError>
pub fn expiry_revision( &self, expiry: f64, ) -> Result<Option<u64>, FerroRiskError>
pub fn strike_revision(
&self,
expiry: f64,
strike: f64,
) -> Result<Option<u64>, FerroRiskError>
pub fn strike_revision( &self, expiry: f64, strike: f64, ) -> Result<Option<u64>, FerroRiskError>
pub fn contracts_at_expiry(
&self,
expiry: f64,
) -> Result<Vec<&ChainContractSnapshot>, FerroRiskError>
pub fn contracts_at_expiry( &self, expiry: f64, ) -> Result<Vec<&ChainContractSnapshot>, FerroRiskError>
pub fn contracts_at_expiry_and_strike(
&self,
expiry: f64,
strike: f64,
) -> Result<Vec<&ChainContractSnapshot>, FerroRiskError>
pub fn contracts_at_expiry_and_strike( &self, expiry: f64, strike: f64, ) -> Result<Vec<&ChainContractSnapshot>, FerroRiskError>
pub fn replace_snapshot(
&mut self,
snapshot: ChainSnapshot,
) -> Result<ChainRefreshReport, FerroRiskError>
pub fn replace_snapshot( &mut self, snapshot: ChainSnapshot, ) -> Result<ChainRefreshReport, FerroRiskError>
pub fn apply_update_batch(
&mut self,
batch: ChainUpdateBatch,
) -> Result<ChainRefreshReport, FerroRiskError>
pub fn apply_update_batch( &mut self, batch: ChainUpdateBatch, ) -> Result<ChainRefreshReport, FerroRiskError>
Trait Implementations§
§impl Clone for ChainState
impl Clone for ChainState
§fn clone(&self) -> ChainState
fn clone(&self) -> ChainState
1.0.0 (const: )§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Auto Trait Implementations§
impl Freeze for ChainState
impl RefUnwindSafe for ChainState
impl Send for ChainState
impl Sync for ChainState
impl Unpin for ChainState
impl UnsafeUnpin for ChainState
impl UnwindSafe for ChainState
Blanket Implementations§
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)