pub struct WsDispatchState {
pub order_identities: DashMap<ClientOrderId, OrderIdentity>,
pub pending_requests: DashMap<String, PendingRequest>,
/* private fields */
}Expand description
Tracks order lifecycle state for dispatch routing.
Orders with a registered identity (submitted through this client) produce proper order events. Orders without identity (external or pre-existing) fall back to execution reports for reconciliation.
Fields§
§order_identities: DashMap<ClientOrderId, OrderIdentity>§pending_requests: DashMap<String, PendingRequest>Implementations§
Source§impl WsDispatchState
impl WsDispatchState
pub fn has_emitted_accepted(&self, cid: &ClientOrderId) -> bool
Sourcepub fn insert_accepted(&self, cid: ClientOrderId)
pub fn insert_accepted(&self, cid: ClientOrderId)
Marks an order as having emitted an OrderAccepted event.
pub fn has_filled(&self, cid: &ClientOrderId) -> bool
Sourcepub fn insert_filled(&self, cid: ClientOrderId)
pub fn insert_filled(&self, cid: ClientOrderId)
Marks an order as having received a fill.
Sourcepub fn cleanup_terminal(&self, cid: ClientOrderId)
pub fn cleanup_terminal(&self, cid: ClientOrderId)
Removes all tracking state for a terminal order.
Trait Implementations§
Source§impl Debug for WsDispatchState
impl Debug for WsDispatchState
Auto Trait Implementations§
impl !Freeze for WsDispatchState
impl !RefUnwindSafe for WsDispatchState
impl Send for WsDispatchState
impl Sync for WsDispatchState
impl Unpin for WsDispatchState
impl UnsafeUnpin for WsDispatchState
impl UnwindSafe for WsDispatchState
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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