Skip to main content

OrderInitializedSpec

Struct OrderInitializedSpec 

Source
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>§tags: Option<Vec<Ustr>>

Implementations§

Source§

impl OrderInitializedSpec

Source

pub fn builder() -> OrderInitializedSpecBuilder

Create an instance of OrderInitializedSpec using the builder syntax

Trait Implementations§

Source§

impl Clone for OrderInitializedSpec

Source§

fn clone(&self) -> OrderInitializedSpec

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrderInitializedSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> Ungil for T
where T: Send,