pub struct OptionChainSliceHandle(/* private fields */);Expand description
Boundary-owned wrapper that lets OptionChainSlice cross the
cdylib FFI boundary by reference.
The host constructs an instance, hands a
*const OptionChainSliceHandle to the plug-in for the duration of
the callback, and drops the handle when the call returns. The
plug-in only borrows the handle and never owns it.
Implementations§
Source§impl OptionChainSliceHandle
impl OptionChainSliceHandle
Sourcepub fn new(slice: OptionChainSlice) -> Self
pub fn new(slice: OptionChainSlice) -> Self
Wraps slice in a boundary-owned handle.
Sourcepub fn chain(&self) -> &OptionChainSlice
pub fn chain(&self) -> &OptionChainSlice
Returns a reference to the wrapped option chain slice.
Sourcepub fn into_inner(self) -> OptionChainSlice
pub fn into_inner(self) -> OptionChainSlice
Consumes the wrapper and returns the inner option chain slice.
Methods from Deref<Target = OptionChainSlice>§
Sourcepub fn call_count(&self) -> usize
pub fn call_count(&self) -> usize
Returns the number of call entries.
Sourcepub fn get_call(&self, strike: &Price) -> Option<&OptionStrikeData>
pub fn get_call(&self, strike: &Price) -> Option<&OptionStrikeData>
Returns the call data for a given strike price.
Sourcepub fn get_put(&self, strike: &Price) -> Option<&OptionStrikeData>
pub fn get_put(&self, strike: &Price) -> Option<&OptionStrikeData>
Returns the put data for a given strike price.
Sourcepub fn get_call_quote(&self, strike: &Price) -> Option<&QuoteTick>
pub fn get_call_quote(&self, strike: &Price) -> Option<&QuoteTick>
Returns the call quote for a given strike price.
Sourcepub fn get_call_greeks(&self, strike: &Price) -> Option<&OptionGreeks>
pub fn get_call_greeks(&self, strike: &Price) -> Option<&OptionGreeks>
Returns the call Greeks for a given strike price.
Sourcepub fn get_put_quote(&self, strike: &Price) -> Option<&QuoteTick>
pub fn get_put_quote(&self, strike: &Price) -> Option<&QuoteTick>
Returns the put quote for a given strike price.
Sourcepub fn get_put_greeks(&self, strike: &Price) -> Option<&OptionGreeks>
pub fn get_put_greeks(&self, strike: &Price) -> Option<&OptionGreeks>
Returns the put Greeks for a given strike price.
Sourcepub fn strikes(&self) -> Vec<Price>
pub fn strikes(&self) -> Vec<Price>
Returns all strike prices present in the chain (union of calls and puts).
Sourcepub fn strike_count(&self) -> usize
pub fn strike_count(&self) -> usize
Returns the total number of unique strikes.
Trait Implementations§
Source§impl Clone for OptionChainSliceHandle
impl Clone for OptionChainSliceHandle
Source§fn clone(&self) -> OptionChainSliceHandle
fn clone(&self) -> OptionChainSliceHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more