pub struct ExchangeContext<'a> {
pub venue: Venue,
pub base_currency: Option<Currency>,
pub instruments: &'a AHashMap<InstrumentId, InstrumentAny>,
pub matching_engines: &'a AHashMap<InstrumentId, OrderMatchingEngine>,
pub cache: &'a Cache,
}Expand description
Read-only view of exchange state passed to simulation modules during processing.
Fields§
§venue: VenueThe venue identifier.
base_currency: Option<Currency>The optional base currency for single-currency accounts.
instruments: &'a AHashMap<InstrumentId, InstrumentAny>All instruments registered on the exchange.
matching_engines: &'a AHashMap<InstrumentId, OrderMatchingEngine>All matching engines, providing order book access.
cache: &'a CacheRead-only cache access for querying positions and other state.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ExchangeContext<'a>
impl<'a> !RefUnwindSafe for ExchangeContext<'a>
impl<'a> !Send for ExchangeContext<'a>
impl<'a> !Sync for ExchangeContext<'a>
impl<'a> Unpin for ExchangeContext<'a>
impl<'a> UnsafeUnpin for ExchangeContext<'a>
impl<'a> !UnwindSafe for ExchangeContext<'a>
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