pub struct TickerPoint {
pub ts_ms: i64,
pub last: f64,
pub bid: f64,
pub ask: f64,
pub high_24h: f64,
pub low_24h: f64,
pub vol_24h: f64,
pub quote_vol_24h: f64,
pub change_pct_24h: f64,
}Expand description
64 B ticker record (LE): u64 ts_ms f64 last, bid, ask f64 high_24h, low_24h, vol_24h, quote_vol_24h, price_change_pct_24h
Absent Optional fields are stored as f64::NAN.
Fields§
§ts_ms: i64§last: f64§bid: f64§ask: f64§high_24h: f64§low_24h: f64§vol_24h: f64§quote_vol_24h: f64§change_pct_24h: f64Implementations§
Source§impl TickerPoint
impl TickerPoint
pub fn from_ticker(t: &Ticker) -> Self
Trait Implementations§
Source§impl Clone for TickerPoint
impl Clone for TickerPoint
Source§fn clone(&self) -> TickerPoint
fn clone(&self) -> TickerPoint
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 DataPoint for TickerPoint
impl DataPoint for TickerPoint
Source§const RECORD_SIZE: usize = SIZE
const RECORD_SIZE: usize = SIZE
On-disk record size in bytes. MUST be constant for the type. Read more
Source§fn encode(&self, out: &mut [u8])
fn encode(&self, out: &mut [u8])
Encode
self to a fixed-size buffer (little-endian). Read moreSource§fn decode(bytes: &[u8]) -> Option<Self>
fn decode(bytes: &[u8]) -> Option<Self>
Decode from a fixed-size buffer. Returns None on malformed bytes. Read more
Source§fn timestamp_ms(&self) -> i64
fn timestamp_ms(&self) -> i64
Timestamp in milliseconds. Used for warm-start / range queries.
Source§fn from_stream_event(ev: &StreamEvent) -> Option<Self>
fn from_stream_event(ev: &StreamEvent) -> Option<Self>
Try to extract
Self from a raw WS StreamEvent. Returns None if the
event doesn’t carry data for this class.Source§fn encode_blob(&self) -> Option<Vec<u8>>
fn encode_blob(&self) -> Option<Vec<u8>>
Variable-length bytes to append to the companion
.blob file. Read moreSource§impl Debug for TickerPoint
impl Debug for TickerPoint
Source§impl<'de> Deserialize<'de> for TickerPoint
impl<'de> Deserialize<'de> for TickerPoint
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 TickerPoint
impl RefUnwindSafe for TickerPoint
impl Send for TickerPoint
impl Sync for TickerPoint
impl Unpin for TickerPoint
impl UnsafeUnpin for TickerPoint
impl UnwindSafe for TickerPoint
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