#[repr(C)]pub struct ZeroCopyTrade {
pub symbol_id: u32,
pub side: u32,
pub trade_id: u64,
pub timestamp_ns: u64,
pub price: u64,
pub quantity: u64,
}Expand description
Zero-copy trade message
Fixed-size structure for receiving binary trade data from exchanges.
Fields§
§symbol_id: u32Symbol identifier (exchange-specific)
side: u32Trade side: 0 = Buy, 1 = Sell
trade_id: u64Trade ID from exchange
timestamp_ns: u64Exchange timestamp in nanoseconds
price: u64Price as fixed-point integer
quantity: u64Quantity as fixed-point integer
Implementations§
Trait Implementations§
Source§impl Clone for ZeroCopyTrade
impl Clone for ZeroCopyTrade
Source§fn clone(&self) -> ZeroCopyTrade
fn clone(&self) -> ZeroCopyTrade
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZeroCopyTrade
impl Debug for ZeroCopyTrade
impl Copy for ZeroCopyTrade
impl Pod for ZeroCopyTrade
Auto Trait Implementations§
impl Freeze for ZeroCopyTrade
impl RefUnwindSafe for ZeroCopyTrade
impl Send for ZeroCopyTrade
impl Sync for ZeroCopyTrade
impl Unpin for ZeroCopyTrade
impl UnwindSafe for ZeroCopyTrade
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.