Skip to main content

OrderUpdatePoint

Struct OrderUpdatePoint 

Source
pub struct OrderUpdatePoint {
Show 13 fields pub ts_ms: i64, pub order_id_hash: u64, pub client_id_hash: u64, pub status: u8, pub side: u8, pub order_type: u8, pub price: f64, pub qty: f64, pub filled_qty: f64, pub avg_price: f64, pub last_fill_price: f64, pub last_fill_qty: f64, pub last_fill_commission: f64,
}
Expand description

On-disk record (96 bytes LE) for an order lifecycle event: u64 ts_ms (8) — event timestamp u64 order_id_hash (8) — fnv1a-64 of order_id string u64 client_id_hash (8) — fnv1a-64 of client_order_id, or 0 u8 status (1) — OrderStatus enum value (see STATUS_* consts) u8 side (1) — 0=Buy 1=Sell u8 order_type (1) — 0=Market 1=Limit 2=Other u8 _pad (1) f64 price (8) — limit price (0.0 for market) f64 qty (8) — total order quantity f64 filled_qty (8) — cumulative filled quantity f64 avg_price (8) — average fill price (0.0 if none) f64 last_fill_price (8) — last fill price (0.0 if none) f64 last_fill_qty (8) — last fill quantity (0.0 if none) f64 last_fill_comm (8) — last fill commission (0.0 if none) 32 bytes reserved (zero-padded)

Fields§

§ts_ms: i64§order_id_hash: u64§client_id_hash: u64§status: u8

OrderStatus encoded: 0=New/Open, 1=PartiallyFilled, 2=Filled, 3=Canceled, 4=Rejected/Expired

§side: u8

0=Buy, 1=Sell

§order_type: u8

0=Market, 1=Limit, 2=Other

§price: f64§qty: f64§filled_qty: f64§avg_price: f64§last_fill_price: f64§last_fill_qty: f64§last_fill_commission: f64

Implementations§

Source§

impl OrderUpdatePoint

Source

pub fn status_label(&self) -> &'static str

Source

pub fn side_label(&self) -> &'static str

Source

pub fn order_type_label(&self) -> &'static str

Trait Implementations§

Source§

impl Clone for OrderUpdatePoint

Source§

fn clone(&self) -> OrderUpdatePoint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl DataPoint for OrderUpdatePoint

Source§

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])

Encode self to a fixed-size buffer (little-endian). Read more
Source§

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

Timestamp in milliseconds. Used for warm-start / range queries.
Source§

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>>

Variable-length bytes to append to the companion .blob file. Read more
Source§

fn decode_blob(header: &[u8], _blob: &[u8]) -> Option<Self>

Reconstruct Self from header bytes + blob slice. Read more
Source§

fn blob_pointer_offset() -> Option<usize>

Some(offset) if the type uses blob storage; None otherwise. Read more
Source§

impl Debug for OrderUpdatePoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for OrderUpdatePoint

Source§

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 OrderUpdatePoint

Source§

fn eq(&self, other: &OrderUpdatePoint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for OrderUpdatePoint

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for OrderUpdatePoint

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more