pub struct BalanceUpdatePoint {
pub ts_ms: i64,
pub asset_hash: u64,
pub free: f64,
pub locked: f64,
pub total: f64,
pub delta: f64,
}Expand description
On-disk record (48 bytes LE) for an account balance change event: u64 ts_ms (8) u64 asset_hash (8) — fnv1a-64 of asset string (e.g. “USDT”) f64 free (8) — available balance after change f64 locked (8) — locked/reserved balance after change f64 total (8) — free + locked f64 delta (8) — signed change (positive = credit, negative = debit, 0.0 if unknown) Total: 48 bytes
Fields§
§ts_ms: i64§asset_hash: u64fnv1a-64 hash of the asset ticker string. Use asset field for display;
asset_hash is the compact storage form.
free: f64§locked: f64§total: f64§delta: f64Trait Implementations§
Source§impl Clone for BalanceUpdatePoint
impl Clone for BalanceUpdatePoint
Source§fn clone(&self) -> BalanceUpdatePoint
fn clone(&self) -> BalanceUpdatePoint
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 BalanceUpdatePoint
impl DataPoint for BalanceUpdatePoint
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 BalanceUpdatePoint
impl Debug for BalanceUpdatePoint
Source§impl<'de> Deserialize<'de> for BalanceUpdatePoint
impl<'de> Deserialize<'de> for BalanceUpdatePoint
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
Source§impl PartialEq for BalanceUpdatePoint
impl PartialEq for BalanceUpdatePoint
Source§fn eq(&self, other: &BalanceUpdatePoint) -> bool
fn eq(&self, other: &BalanceUpdatePoint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BalanceUpdatePoint
impl Serialize for BalanceUpdatePoint
impl StructuralPartialEq for BalanceUpdatePoint
Auto Trait Implementations§
impl Freeze for BalanceUpdatePoint
impl RefUnwindSafe for BalanceUpdatePoint
impl Send for BalanceUpdatePoint
impl Sync for BalanceUpdatePoint
impl Unpin for BalanceUpdatePoint
impl UnsafeUnpin for BalanceUpdatePoint
impl UnwindSafe for BalanceUpdatePoint
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