pub struct Stock {
pub stock_id: Option<u64>,
pub price: Option<f64>,
pub pre_close: Option<f64>,
pub selected_time: Option<u32>,
pub selected_price: Option<f64>,
pub total_market_cap: Option<f64>,
}Fields§
§stock_id: Option<u64>§price: Option<f64>§pre_close: Option<f64>§selected_time: Option<u32>§selected_price: Option<f64>§total_market_cap: Option<f64>Implementations§
Source§impl Stock
impl Stock
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 pre_close(&self) -> f64
pub fn pre_close(&self) -> f64
Returns the value of pre_close, or the default value if pre_close is unset.
Sourcepub fn selected_time(&self) -> u32
pub fn selected_time(&self) -> u32
Returns the value of selected_time, or the default value if selected_time is unset.
Sourcepub fn selected_price(&self) -> f64
pub fn selected_price(&self) -> f64
Returns the value of selected_price, or the default value if selected_price is unset.
Sourcepub fn total_market_cap(&self) -> f64
pub fn total_market_cap(&self) -> f64
Returns the value of total_market_cap, or the default value if total_market_cap is unset.
Trait Implementations§
impl Copy for Stock
Source§impl<'de> Deserialize<'de> for Stock
impl<'de> Deserialize<'de> for Stock
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 Stock
impl Message for Stock
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 Stock
Auto Trait Implementations§
impl Freeze for Stock
impl RefUnwindSafe for Stock
impl Send for Stock
impl Sync for Stock
impl Unpin for Stock
impl UnsafeUnpin for Stock
impl UnwindSafe for Stock
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