pub struct PriceUpdate {Show 33 fields
pub id: String,
pub price: f32,
pub time: i64,
pub currency: String,
pub exchange: String,
pub quote_type: QuoteType,
pub market_hours: MarketHoursType,
pub change_percent: f32,
pub day_volume: i64,
pub day_high: f32,
pub day_low: f32,
pub change: f32,
pub short_name: String,
pub expire_date: i64,
pub open_price: f32,
pub previous_close: f32,
pub strike_price: f32,
pub underlying_symbol: String,
pub open_interest: i64,
pub options_type: OptionType,
pub mini_option: i64,
pub last_size: i64,
pub bid: f32,
pub bid_size: i64,
pub ask: f32,
pub ask_size: i64,
pub price_hint: i64,
pub vol_24hr: i64,
pub vol_all_currencies: i64,
pub from_currency: String,
pub last_market: String,
pub circulating_supply: f64,
pub market_cap: f64,
}Expand description
Real-time price update from Yahoo Finance WebSocket.
This is the user-facing struct with properly typed enum fields
that serialize to readable strings like "EQUITY" or "CRYPTOCURRENCY".
Fields§
§id: String§price: f32§time: i64§currency: String§exchange: String§quote_type: QuoteType§market_hours: MarketHoursType§change_percent: f32§day_volume: i64§day_high: f32§day_low: f32§change: f32§short_name: String§expire_date: i64§open_price: f32§previous_close: f32§strike_price: f32§underlying_symbol: String§open_interest: i64§options_type: OptionType§mini_option: i64§last_size: i64§bid: f32§bid_size: i64§ask: f32§ask_size: i64§price_hint: i64§vol_24hr: i64§vol_all_currencies: i64§from_currency: String§last_market: String§circulating_supply: f64§market_cap: f64Trait Implementations§
Source§impl Clone for PriceUpdate
impl Clone for PriceUpdate
Source§fn clone(&self) -> PriceUpdate
fn clone(&self) -> PriceUpdate
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 PriceUpdate
impl Debug for PriceUpdate
Source§impl<'de> Deserialize<'de> for PriceUpdate
impl<'de> Deserialize<'de> for PriceUpdate
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
Auto Trait Implementations§
impl Freeze for PriceUpdate
impl RefUnwindSafe for PriceUpdate
impl Send for PriceUpdate
impl Sync for PriceUpdate
impl Unpin for PriceUpdate
impl UnwindSafe for PriceUpdate
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more