pub struct BarPoint {
pub open_time: i64,
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub volume: f64,
pub quote_volume: f64,
pub trades_count: u64,
}Expand description
64 B bar record (LE): u64 open_time_ms f64 open, high, low, close f64 volume f64 quote_volume (NaN if absent) u64 trades_count (0 if absent)
Fields§
§open_time: i64§open: f64§high: f64§low: f64§close: f64§volume: f64§quote_volume: f64§trades_count: u64Implementations§
Trait Implementations§
Source§impl DataPoint for BarPoint
impl DataPoint for BarPoint
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<'de> Deserialize<'de> for BarPoint
impl<'de> Deserialize<'de> for BarPoint
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 BarPoint
impl RefUnwindSafe for BarPoint
impl Send for BarPoint
impl Sync for BarPoint
impl Unpin for BarPoint
impl UnsafeUnpin for BarPoint
impl UnwindSafe for BarPoint
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