pub struct OrderInitializedSpec {Show 33 fields
pub trader_id: TraderId,
pub strategy_id: StrategyId,
pub instrument_id: InstrumentId,
pub client_order_id: ClientOrderId,
pub order_side: OrderSide,
pub order_type: OrderType,
pub quantity: Quantity,
pub time_in_force: TimeInForce,
pub post_only: bool,
pub reduce_only: bool,
pub quote_quantity: bool,
pub reconciliation: bool,
pub event_id: UUID4,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
pub price: Option<Price>,
pub trigger_price: Option<Price>,
pub trigger_type: Option<TriggerType>,
pub limit_offset: Option<Decimal>,
pub trailing_offset: Option<Decimal>,
pub trailing_offset_type: Option<TrailingOffsetType>,
pub expire_time: Option<UnixNanos>,
pub display_qty: Option<Quantity>,
pub emulation_trigger: Option<TriggerType>,
pub trigger_instrument_id: Option<InstrumentId>,
pub contingency_type: Option<ContingencyType>,
pub order_list_id: Option<OrderListId>,
pub linked_order_ids: Option<Vec<ClientOrderId>>,
pub parent_order_id: Option<ClientOrderId>,
pub exec_algorithm_id: Option<ExecAlgorithmId>,
pub exec_algorithm_params: Option<IndexMap<Ustr, Ustr>>,
pub exec_spawn_id: Option<ClientOrderId>,
pub tags: Option<Vec<Ustr>>,
}Expand description
Test-only fluent spec for OrderInitialized.
All fields carry sensible defaults so callers only set what differs.
build() constructs the event through OrderInitialized::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§order_side: OrderSide§order_type: OrderType§quantity: Quantity§time_in_force: TimeInForce§post_only: bool§reduce_only: bool§quote_quantity: bool§reconciliation: bool§event_id: UUID4§ts_event: UnixNanos§ts_init: UnixNanos§price: Option<Price>§trigger_price: Option<Price>§trigger_type: Option<TriggerType>§limit_offset: Option<Decimal>§trailing_offset: Option<Decimal>§trailing_offset_type: Option<TrailingOffsetType>§expire_time: Option<UnixNanos>§display_qty: Option<Quantity>§emulation_trigger: Option<TriggerType>§trigger_instrument_id: Option<InstrumentId>§contingency_type: Option<ContingencyType>§order_list_id: Option<OrderListId>§linked_order_ids: Option<Vec<ClientOrderId>>§parent_order_id: Option<ClientOrderId>§exec_algorithm_id: Option<ExecAlgorithmId>§exec_algorithm_params: Option<IndexMap<Ustr, Ustr>>§exec_spawn_id: Option<ClientOrderId>Implementations§
Source§impl OrderInitializedSpec
impl OrderInitializedSpec
Sourcepub fn builder() -> OrderInitializedSpecBuilder
pub fn builder() -> OrderInitializedSpecBuilder
Create an instance of OrderInitializedSpec using the builder syntax
Trait Implementations§
Source§impl Clone for OrderInitializedSpec
impl Clone for OrderInitializedSpec
Source§fn clone(&self) -> OrderInitializedSpec
fn clone(&self) -> OrderInitializedSpec
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 OrderInitializedSpec
impl RefUnwindSafe for OrderInitializedSpec
impl Send for OrderInitializedSpec
impl Sync for OrderInitializedSpec
impl Unpin for OrderInitializedSpec
impl UnsafeUnpin for OrderInitializedSpec
impl UnwindSafe for OrderInitializedSpec
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