pub struct DepthLadder {
pub instrument: Instrument,
pub bids: Vec<DepthLevel>,
pub asks: Vec<DepthLevel>,
pub event_time: Option<DateTime<Utc>>,
pub received_time: DateTime<Utc>,
pub change_id: Option<u64>,
}Expand description
A normalized order-book depth snapshot for one Instrument
(docs/01-domain-model.md §5) — a DOMAIN type (a provider emits it via
MarketUpdate::Depth), never a UI type.
Only depth-capable providers populate it (Deribit option instruments;
Alpaca crypto-spot only, which is outside the v1 option-chain product; IG
unverified-pending-fixture — see docs/03-data-providers.md). Others never
emit it and the depth screen renders its empty state. Levels are best-first.
Carries the two clocks of §5.1 plus an optional venue sequence id.
Fields§
§instrument: InstrumentThe provider-agnostic identity this book applies to (issue #4).
bids: Vec<DepthLevel>Bid levels, best-first (highest price at index 0).
asks: Vec<DepthLevel>Ask levels, best-first (lowest price at index 0).
event_time: Option<DateTime<Utc>>The venue’s book timestamp — Some only when the feed carries one
(§5.1).
received_time: DateTime<Utc>When ChainView normalized this snapshot — always present (§5.1).
change_id: Option<u64>The upstream sequence / change id for gap detection and resync (Deribit),
or None when the feed carries no sequence. Consumed by the depth path
in v0.5; carried now.
Trait Implementations§
Source§impl Clone for DepthLadder
impl Clone for DepthLadder
Source§fn clone(&self) -> DepthLadder
fn clone(&self) -> DepthLadder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DepthLadder
impl RefUnwindSafe for DepthLadder
impl Send for DepthLadder
impl Sync for DepthLadder
impl Unpin for DepthLadder
impl UnsafeUnpin for DepthLadder
impl UnwindSafe for DepthLadder
Blanket Implementations§
impl<T> Allocation for T
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,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.