pub struct ContractItem {Show 20 fields
pub contract_security: Security,
pub event_security: Option<Security>,
pub series_security: Option<Security>,
pub contract_type: Option<i32>,
pub title: Option<String>,
pub yes_sub_title: Option<String>,
pub open_time: Option<String>,
pub close_time: Option<String>,
pub determination_time: Option<String>,
pub settled_time: Option<String>,
pub latest_expiration_time: Option<String>,
pub status: Option<i32>,
pub result: Option<String>,
pub settlement_value: Option<String>,
pub expiration_value: Option<String>,
pub volume: Option<String>,
pub can_close_early: Option<bool>,
pub tick_size: Option<String>,
pub category: Option<String>,
pub tag: Option<String>,
}Expand description
合约项
Fields§
§contract_security: Security===== 标识 =====
合约标的
event_security: Option<Security>所属 Event
series_security: Option<Security>所属 Series
contract_type: Option<i32>合约类型 (Binary/Scalar)
title: Option<String>===== 名称 =====
合约标题(多语言)
yes_sub_title: Option<String>YES 的子标题(多语言)
open_time: Option<String>===== 时间(UTC ISO8601 字符串,形如 2025-09-26T18:30:00Z)=====
合约开始时间
close_time: Option<String>合约结束时间
determination_time: Option<String>结果确定时间
settled_time: Option<String>结算完成时间
latest_expiration_time: Option<String>最新到期时间
status: Option<i32>===== 状态与结果 =====
合约状态
result: Option<String>合约结果
settlement_value: Option<String>合约结算价值
expiration_value: Option<String>合约到期结果
volume: Option<String>===== 交易属性 =====
合约成交量
can_close_early: Option<bool>是否可提早结束交易
tick_size: Option<String>价位
category: Option<String>===== 分类 =====
一级分类标识
tag: Option<String>二级分类标识
Implementations§
Source§impl ContractItem
impl ContractItem
Sourcepub fn contract_type(&self) -> EcContractType
pub fn contract_type(&self) -> EcContractType
Returns the enum value of contract_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_contract_type(&mut self, value: EcContractType)
pub fn set_contract_type(&mut self, value: EcContractType)
Sets contract_type to the provided enum value.
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Returns the value of title, or the default value if title is unset.
Sourcepub fn yes_sub_title(&self) -> &str
pub fn yes_sub_title(&self) -> &str
Returns the value of yes_sub_title, or the default value if yes_sub_title is unset.
Sourcepub fn open_time(&self) -> &str
pub fn open_time(&self) -> &str
Returns the value of open_time, or the default value if open_time is unset.
Sourcepub fn close_time(&self) -> &str
pub fn close_time(&self) -> &str
Returns the value of close_time, or the default value if close_time is unset.
Sourcepub fn determination_time(&self) -> &str
pub fn determination_time(&self) -> &str
Returns the value of determination_time, or the default value if determination_time is unset.
Sourcepub fn settled_time(&self) -> &str
pub fn settled_time(&self) -> &str
Returns the value of settled_time, or the default value if settled_time is unset.
Sourcepub fn latest_expiration_time(&self) -> &str
pub fn latest_expiration_time(&self) -> &str
Returns the value of latest_expiration_time, or the default value if latest_expiration_time is unset.
Sourcepub fn status(&self) -> EcStatus
pub fn status(&self) -> EcStatus
Returns the enum value of status, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: EcStatus)
pub fn set_status(&mut self, value: EcStatus)
Sets status to the provided enum value.
Sourcepub fn result(&self) -> &str
pub fn result(&self) -> &str
Returns the value of result, or the default value if result is unset.
Sourcepub fn settlement_value(&self) -> &str
pub fn settlement_value(&self) -> &str
Returns the value of settlement_value, or the default value if settlement_value is unset.
Sourcepub fn expiration_value(&self) -> &str
pub fn expiration_value(&self) -> &str
Returns the value of expiration_value, or the default value if expiration_value is unset.
Sourcepub fn volume(&self) -> &str
pub fn volume(&self) -> &str
Returns the value of volume, or the default value if volume is unset.
Sourcepub fn can_close_early(&self) -> bool
pub fn can_close_early(&self) -> bool
Returns the value of can_close_early, or the default value if can_close_early is unset.
Sourcepub fn tick_size(&self) -> &str
pub fn tick_size(&self) -> &str
Returns the value of tick_size, or the default value if tick_size is unset.
Trait Implementations§
Source§impl Clone for ContractItem
impl Clone for ContractItem
Source§fn clone(&self) -> ContractItem
fn clone(&self) -> ContractItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContractItem
impl Debug for ContractItem
Source§impl Default for ContractItem
impl Default for ContractItem
Source§impl<'de> Deserialize<'de> for ContractItemwhere
ContractItem: Default,
impl<'de> Deserialize<'de> for ContractItemwhere
ContractItem: 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>,
impl Eq for ContractItem
Source§impl Hash for ContractItem
impl Hash for ContractItem
Source§impl Message for ContractItem
impl Message for ContractItem
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self.Source§impl PartialEq for ContractItem
impl PartialEq for ContractItem
Source§fn eq(&self, other: &ContractItem) -> bool
fn eq(&self, other: &ContractItem) -> bool
self and other values to be equal, and is used by ==.