#[non_exhaustive]pub enum PriceStreamItem {
Price(ClientPrice),
Heartbeat(PricingHeartbeat),
}Expand description
A single line of the pricing stream: either a price update or a heartbeat (sent every 5 seconds to keep the connection alive).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Price(ClientPrice)
A price update ("type": "PRICE").
Heartbeat(PricingHeartbeat)
A keep-alive heartbeat ("type": "HEARTBEAT").
Trait Implementations§
Source§impl Clone for PriceStreamItem
impl Clone for PriceStreamItem
Source§fn clone(&self) -> PriceStreamItem
fn clone(&self) -> PriceStreamItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PriceStreamItem
impl Debug for PriceStreamItem
Source§impl<'de> Deserialize<'de> for PriceStreamItem
impl<'de> Deserialize<'de> for PriceStreamItem
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PriceStreamItem
impl PartialEq for PriceStreamItem
Source§impl Serialize for PriceStreamItem
impl Serialize for PriceStreamItem
impl StructuralPartialEq for PriceStreamItem
Auto Trait Implementations§
impl Freeze for PriceStreamItem
impl RefUnwindSafe for PriceStreamItem
impl Send for PriceStreamItem
impl Sync for PriceStreamItem
impl Unpin for PriceStreamItem
impl UnsafeUnpin for PriceStreamItem
impl UnwindSafe for PriceStreamItem
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