pub struct Future {
pub last_settlement_price: Option<i64>,
pub hold_vol: Option<i64>,
pub diff_hold_vol: Option<i64>,
pub main_flag: Option<i32>,
pub distance_due_date: Option<i64>,
}Expand description
美国期货, 港股期货
Fields§
§last_settlement_price: Option<i64>昨结
hold_vol: Option<i64>持仓量,单位: 张
diff_hold_vol: Option<i64>日增仓,单位:张
main_flag: Option<i32>主力合约标记,1表示是主力合约
distance_due_date: Option<i64>距离到期日天数 -1表示过期,-2表示没有到期日
Implementations§
Source§impl Future
impl Future
Sourcepub fn last_settlement_price(&self) -> i64
pub fn last_settlement_price(&self) -> i64
Returns the value of last_settlement_price, or the default value if last_settlement_price is unset.
Sourcepub fn hold_vol(&self) -> i64
pub fn hold_vol(&self) -> i64
Returns the value of hold_vol, or the default value if hold_vol is unset.
Sourcepub fn diff_hold_vol(&self) -> i64
pub fn diff_hold_vol(&self) -> i64
Returns the value of diff_hold_vol, or the default value if diff_hold_vol is unset.
Sourcepub fn main_flag(&self) -> i32
pub fn main_flag(&self) -> i32
Returns the value of main_flag, or the default value if main_flag is unset.
Sourcepub fn distance_due_date(&self) -> i64
pub fn distance_due_date(&self) -> i64
Returns the value of distance_due_date, or the default value if distance_due_date is unset.
Trait Implementations§
Source§impl Message for Future
impl Message for Future
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.impl Copy for Future
impl Eq for Future
impl StructuralPartialEq for Future
Auto Trait Implementations§
impl Freeze for Future
impl RefUnwindSafe for Future
impl Send for Future
impl Sync for Future
impl Unpin for Future
impl UnsafeUnpin for Future
impl UnwindSafe for Future
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.