pub struct C2s {
pub security_list: Vec<Security>,
pub sub_type_list: Vec<i32>,
pub is_sub_or_un_sub: bool,
pub is_reg_or_un_reg_push: Option<bool>,
pub is_first_push: Option<bool>,
pub is_unsub_all: Option<bool>,
pub kline_source: Vec<i32>,
pub header: Option<QotHeader>,
}Expand description
事件合约订阅/反订阅
Fields§
§security_list: Vec<Security>合约标的(market+code),订阅语义与通用订阅一致
sub_type_list: Vec<i32>Qot_Common.SubType,复用通用订阅类型
is_sub_or_un_sub: booltrue订阅/false反订阅
is_reg_or_un_reg_push: Option<bool>是否注册/反注册推送
is_first_push: Option<bool>注册后是否首推已有数据,默认true
is_unsub_all: Option<bool>true时忽略其他参数,取消该连接所有EC订阅
kline_source: Vec<i32>K线来源列表(None/OrderBookYes),订阅KL_*时生效,不填默认[None]
header: Option<QotHeader>行情公共参数头
Implementations§
Source§impl C2s
impl C2s
Sourcepub fn is_reg_or_un_reg_push(&self) -> bool
pub fn is_reg_or_un_reg_push(&self) -> bool
Returns the value of is_reg_or_un_reg_push, or the default value if is_reg_or_un_reg_push is unset.
Sourcepub fn is_first_push(&self) -> bool
pub fn is_first_push(&self) -> bool
Returns the value of is_first_push, or the default value if is_first_push is unset.
Sourcepub fn is_unsub_all(&self) -> bool
pub fn is_unsub_all(&self) -> bool
Returns the value of is_unsub_all, or the default value if is_unsub_all is unset.
Sourcepub fn kline_source(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<EcKlineSource>>
pub fn kline_source( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<EcKlineSource>>
Returns an iterator which yields the valid enum values contained in kline_source.
Sourcepub fn push_kline_source(&mut self, value: EcKlineSource)
pub fn push_kline_source(&mut self, value: EcKlineSource)
Appends the provided enum value to kline_source.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for C2s
impl<'de> Deserialize<'de> for C2s
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 C2s
impl Message for C2s
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 StructuralPartialEq for C2s
Auto Trait Implementations§
impl Freeze for C2s
impl RefUnwindSafe for C2s
impl Send for C2s
impl Sync for C2s
impl Unpin for C2s
impl UnsafeUnpin for C2s
impl UnwindSafe for C2s
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