pub struct OrderBookTimes {
pub time_engine: Option<DateTime<Utc>>,
pub time_exchange: Option<DateTime<Utc>>,
pub time_received: DateTime<Utc>,
}Expand description
Venue + local timestamps for an OrderBook revision.
Serves double duty as both the constructor argument
(OrderBook::new/OrderBook::from_sides) and the stored field, so
update/snapshot are one-line copies. The named fields prevent
transposition of the two same-typed Option<DateTime<Utc>> times.
Each timestamp carries exactly one honest meaning; staleness policy is left to the consumer (compose over the accessors).
Fields§
§time_engine: Option<DateTime<Utc>>Matching-engine time ("T" on Binance futures). None when the venue
doesn’t supply it (Binance spot, IBKR, …). Latency/engine audit — not a
liveness signal.
time_exchange: Option<DateTime<Utc>>Venue event/broadcast time ("E" on Binance, ts on Bybit). None when
the venue supplies none (IBKR; Binance spot REST seed). Feed-lag-aware
liveness where present.
time_received: DateTime<Utc>Local ingestion wall-clock — ALWAYS present once a revision is applied.
Universal liveness floor; use when time_exchange is None (e.g. IBKR).
NOTE: a default/pre-population book (OrderBook::default, used as the
manager placeholder before the first event) carries the epoch (1970) here
— desirable for a liveness floor (reads as stale → consumer fail-closes
until the first revision), but it is NOT a real ingestion time.
Trait Implementations§
Source§impl Clone for OrderBookTimes
impl Clone for OrderBookTimes
Source§fn clone(&self) -> OrderBookTimes
fn clone(&self) -> OrderBookTimes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OrderBookTimes
Source§impl Debug for OrderBookTimes
impl Debug for OrderBookTimes
Source§impl Default for OrderBookTimes
impl Default for OrderBookTimes
Source§fn default() -> OrderBookTimes
fn default() -> OrderBookTimes
Source§impl<'de> Deserialize<'de> for OrderBookTimes
impl<'de> Deserialize<'de> for OrderBookTimes
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>,
impl Eq for OrderBookTimes
Source§impl PartialEq for OrderBookTimes
impl PartialEq for OrderBookTimes
Source§fn eq(&self, other: &OrderBookTimes) -> bool
fn eq(&self, other: &OrderBookTimes) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for OrderBookTimes
impl Serialize for OrderBookTimes
impl StructuralPartialEq for OrderBookTimes
Auto Trait Implementations§
impl Freeze for OrderBookTimes
impl RefUnwindSafe for OrderBookTimes
impl Send for OrderBookTimes
impl Sync for OrderBookTimes
impl Unpin for OrderBookTimes
impl UnsafeUnpin for OrderBookTimes
impl UnwindSafe for OrderBookTimes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more