pub struct OrderFilledSpec {Show 19 fields
pub trader_id: TraderId,
pub strategy_id: StrategyId,
pub instrument_id: InstrumentId,
pub client_order_id: ClientOrderId,
pub venue_order_id: VenueOrderId,
pub account_id: AccountId,
pub trade_id: TradeId,
pub order_side: OrderSide,
pub order_type: OrderType,
pub last_qty: Quantity,
pub last_px: Price,
pub currency: Currency,
pub liquidity_side: LiquiditySide,
pub event_id: UUID4,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
pub reconciliation: bool,
pub position_id: Option<PositionId>,
pub commission: Option<Money>,
}Expand description
Test-only fluent spec for OrderFilled.
All fields carry sensible defaults so callers only set what differs.
build() constructs the event through OrderFilled::new so any future invariants
added to the production constructor are exercised by tests built on this spec.
Fields§
§trader_id: TraderId§strategy_id: StrategyId§instrument_id: InstrumentId§client_order_id: ClientOrderId§venue_order_id: VenueOrderId§account_id: AccountId§trade_id: TradeId§order_side: OrderSide§order_type: OrderType§last_qty: Quantity§last_px: Price§currency: Currency§liquidity_side: LiquiditySide§event_id: UUID4§ts_event: UnixNanos§ts_init: UnixNanos§reconciliation: bool§position_id: Option<PositionId>§commission: Option<Money>Implementations§
Source§impl OrderFilledSpec
impl OrderFilledSpec
Sourcepub fn builder() -> OrderFilledSpecBuilder
pub fn builder() -> OrderFilledSpecBuilder
Create an instance of OrderFilledSpec using the builder syntax
Trait Implementations§
Source§impl Clone for OrderFilledSpec
impl Clone for OrderFilledSpec
Source§fn clone(&self) -> OrderFilledSpec
fn clone(&self) -> OrderFilledSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OrderFilledSpec
impl RefUnwindSafe for OrderFilledSpec
impl Send for OrderFilledSpec
impl Sync for OrderFilledSpec
impl Unpin for OrderFilledSpec
impl UnsafeUnpin for OrderFilledSpec
impl UnwindSafe for OrderFilledSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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