pub struct OptionChainInfo {
pub strike_date_timestamp: Option<i64>,
pub product_code: Option<String>,
pub multiplier: Option<f64>,
pub contract_share_size: Option<f64>,
pub expiration_type: Option<i32>,
pub underlying: Option<Security>,
}Expand description
期权链标识(用于后续 Contract 请求的上下文传递)
Fields§
§strike_date_timestamp: Option<i64>行权日时间戳
product_code: Option<String>产品代码
multiplier: Option<f64>合约乘数
合约规模
expiration_type: Option<i32>到期类型
underlying: Option<Security>期权链对应标的
Implementations§
Source§impl OptionChainInfo
impl OptionChainInfo
Sourcepub fn strike_date_timestamp(&self) -> i64
pub fn strike_date_timestamp(&self) -> i64
Returns the value of strike_date_timestamp, or the default value if strike_date_timestamp is unset.
Sourcepub fn product_code(&self) -> &str
pub fn product_code(&self) -> &str
Returns the value of product_code, or the default value if product_code is unset.
Sourcepub fn multiplier(&self) -> f64
pub fn multiplier(&self) -> f64
Returns the value of multiplier, or the default value if multiplier is unset.
Returns the value of contract_share_size, or the default value if contract_share_size is unset.
Sourcepub fn expiration_type(&self) -> i32
pub fn expiration_type(&self) -> i32
Returns the value of expiration_type, or the default value if expiration_type is unset.
Trait Implementations§
Source§impl Clone for OptionChainInfo
impl Clone for OptionChainInfo
Source§fn clone(&self) -> OptionChainInfo
fn clone(&self) -> OptionChainInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OptionChainInfo
impl Debug for OptionChainInfo
Source§impl Default for OptionChainInfo
impl Default for OptionChainInfo
Source§impl<'de> Deserialize<'de> for OptionChainInfowhere
OptionChainInfo: Default,
impl<'de> Deserialize<'de> for OptionChainInfowhere
OptionChainInfo: Default,
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
Source§impl Message for OptionChainInfo
impl Message for OptionChainInfo
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for OptionChainInfo
impl PartialEq for OptionChainInfo
Source§fn eq(&self, other: &OptionChainInfo) -> bool
fn eq(&self, other: &OptionChainInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OptionChainInfo
impl Serialize for OptionChainInfo
impl StructuralPartialEq for OptionChainInfo
Auto Trait Implementations§
impl Freeze for OptionChainInfo
impl RefUnwindSafe for OptionChainInfo
impl Send for OptionChainInfo
impl Sync for OptionChainInfo
impl Unpin for OptionChainInfo
impl UnsafeUnpin for OptionChainInfo
impl UnwindSafe for OptionChainInfo
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