pub struct StockSetting {
pub stock_id: Option<u64>,
pub freq_type: Option<u32>,
pub up_ratio: Option<u32>,
pub down_ratio: Option<u32>,
pub up_price: Option<u32>,
pub down_price: Option<u32>,
}Expand description
单个股票到价提醒设置
Fields§
§stock_id: Option<u64>股票ID
freq_type: Option<u32>提醒频率类型,见FreqType
up_ratio: Option<u32>涨幅设置项, 精确到0.001%, 1000表示1%
down_ratio: Option<u32>跌幅设置项, 绝对值,精确到0.001%, 1000表示1%
up_price: Option<u32>涨价设置项, 精确到0.001元, 1000表示1元
down_price: Option<u32>跌价设置项, 精确到0.001元, 1000表示1元
Implementations§
Source§impl StockSetting
impl StockSetting
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 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 up_ratio(&self) -> u32
pub fn up_ratio(&self) -> u32
Returns the value of up_ratio, or the default value if up_ratio is unset.
Sourcepub fn down_ratio(&self) -> u32
pub fn down_ratio(&self) -> u32
Returns the value of down_ratio, or the default value if down_ratio is unset.
Sourcepub fn up_price(&self) -> u32
pub fn up_price(&self) -> u32
Returns the value of up_price, or the default value if up_price is unset.
Sourcepub fn down_price(&self) -> u32
pub fn down_price(&self) -> u32
Returns the value of down_price, or the default value if down_price is unset.
Trait Implementations§
Source§impl Clone for StockSetting
impl Clone for StockSetting
Source§fn clone(&self) -> StockSetting
fn clone(&self) -> StockSetting
Returns a duplicate of the value. Read more
1.0.0 · 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 StockSetting
impl Debug for StockSetting
Source§impl Default for StockSetting
impl Default for StockSetting
Source§impl Hash for StockSetting
impl Hash for StockSetting
Source§impl Message for StockSetting
impl Message for StockSetting
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 StockSetting
impl PartialEq for StockSetting
impl Copy for StockSetting
impl Eq for StockSetting
impl StructuralPartialEq for StockSetting
Auto Trait Implementations§
impl Freeze for StockSetting
impl RefUnwindSafe for StockSetting
impl Send for StockSetting
impl Sync for StockSetting
impl Unpin for StockSetting
impl UnsafeUnpin for StockSetting
impl UnwindSafe for StockSetting
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.