pub struct BasisPoint {
pub ts_ms: i64,
pub value: f64,
pub mark: f64,
pub index: f64,
}Expand description
32 B record (LE): i64 ts_ms (8), f64 value (8), f64 mark (8), f64 index (8)
value = mark - index. The derived path (BasisDerived) always
populates all four fields. The legacy WS path (no exchange emits
StreamEvent::Basis today) populates mark = NaN, index = NaN.
Fields§
§ts_ms: i64§value: f64basis = mark − index
mark: f64§index: f64Trait Implementations§
Source§impl Clone for BasisPoint
impl Clone for BasisPoint
Source§fn clone(&self) -> BasisPoint
fn clone(&self) -> BasisPoint
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 BasisPoint
impl DataPoint for BasisPoint
Source§fn from_stream_event(ev: &StreamEvent) -> Option<Self>
fn from_stream_event(ev: &StreamEvent) -> Option<Self>
WS path: no exchange emits StreamEvent::Basis with real data today.
Populates mark = NaN, index = NaN for forward-compat if one ever does.
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 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 BasisPoint
impl Debug for BasisPoint
Source§impl<'de> Deserialize<'de> for BasisPoint
impl<'de> Deserialize<'de> for BasisPoint
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 BasisPoint
impl RefUnwindSafe for BasisPoint
impl Send for BasisPoint
impl Sync for BasisPoint
impl Unpin for BasisPoint
impl UnsafeUnpin for BasisPoint
impl UnwindSafe for BasisPoint
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