pub struct ItemAttr {
pub key: Option<u64>,
pub warn_type: Option<u32>,
pub warn_param: Option<i64>,
pub note: Option<String>,
pub enable: Option<bool>,
pub update_time: Option<u64>,
pub freq_type: Option<u32>,
pub oper_type: Option<u32>,
pub stock_id: Option<u64>,
pub fine_warn_param: Option<i64>,
pub notify_time_periods: Vec<u32>,
}Expand description
目前可选属性只有note,若不需要则传入空字符串 除了key属性,其他属性必须填上
Fields§
§key: Option<u64>每个提醒的唯一标识,服务器返回的每个提醒都会有key。若客户端新增加的提醒,则不需要写入该属性
warn_type: Option<u32>提醒类型,见WarnType
warn_param: Option<i64>提醒参数值, 绝对值,用户填写的数值 * 1000 由于客户端实现原因:成交量单位为,万股 成交额单位为 万元 买一卖一量单位为千股
note: Option<String>备注,最大长度为20个字
enable: Option<bool>false为设置不生效,true为设置生效。
update_time: Option<u64>时间戳,单位为秒,客户端修改时需要更新该时间戳,没修改的条目不修改该值
freq_type: Option<u32>提醒频率类型,见FreqType
oper_type: Option<u32>操作类型,@OperType, 添加/删除/修改
stock_id: Option<u64>股票ID
fine_warn_param: Option<i64>高精度股价提醒参数值,股票单价指标(价格涨到、价格跌到、买一价高于、卖一价低于) * 10^9,其他指标 * 10^3,若设置该字段,warn_param无效
notify_time_periods: Vec<u32>提醒时段,见 NotifyTimePeriod 枚举, 股票不支持配置提醒时段则不传
Implementations§
Source§impl ItemAttr
impl ItemAttr
Sourcepub fn warn_type(&self) -> u32
pub fn warn_type(&self) -> u32
Returns the value of warn_type, or the default value if warn_type is unset.
Sourcepub fn warn_param(&self) -> i64
pub fn warn_param(&self) -> i64
Returns the value of warn_param, or the default value if warn_param is unset.
Sourcepub fn enable(&self) -> bool
pub fn enable(&self) -> bool
Returns the value of enable, or the default value if enable is unset.
Sourcepub fn update_time(&self) -> u64
pub fn update_time(&self) -> u64
Returns the value of update_time, or the default value if update_time is unset.
Sourcepub fn freq_type(&self) -> u32
pub fn freq_type(&self) -> u32
Returns the value of freq_type, or the default value if freq_type is unset.
Sourcepub fn oper_type(&self) -> u32
pub fn oper_type(&self) -> u32
Returns the value of oper_type, or the default value if oper_type is unset.
Sourcepub fn stock_id(&self) -> u64
pub fn stock_id(&self) -> u64
Returns the value of stock_id, or the default value if stock_id is unset.
Sourcepub fn fine_warn_param(&self) -> i64
pub fn fine_warn_param(&self) -> i64
Returns the value of fine_warn_param, or the default value if fine_warn_param is unset.
Trait Implementations§
Source§impl Message for ItemAttr
impl Message for ItemAttr
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.impl Eq for ItemAttr
impl StructuralPartialEq for ItemAttr
Auto Trait Implementations§
impl Freeze for ItemAttr
impl RefUnwindSafe for ItemAttr
impl Send for ItemAttr
impl Sync for ItemAttr
impl Unpin for ItemAttr
impl UnsafeUnpin for ItemAttr
impl UnwindSafe for ItemAttr
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
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
§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
§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
key and return true if they are equal.