pub struct TestOrderEventStubs;
Implementations§
Source§impl TestOrderEventStubs
impl TestOrderEventStubs
pub fn submitted(order: &OrderAny, account_id: AccountId) -> OrderEventAny
pub fn accepted( order: &OrderAny, account_id: AccountId, venue_order_id: VenueOrderId, ) -> OrderEventAny
pub fn canceled( order: &OrderAny, account_id: AccountId, venue_order_id: Option<VenueOrderId>, ) -> OrderEventAny
Sourcepub fn filled(
order: &OrderAny,
instrument: &InstrumentAny,
trade_id: Option<TradeId>,
position_id: Option<PositionId>,
last_px: Option<Price>,
last_qty: Option<Quantity>,
liquidity_side: Option<LiquiditySide>,
commission: Option<Money>,
ts_filled_ns: Option<UnixNanos>,
account_id: Option<AccountId>,
) -> OrderEventAny
pub fn filled( order: &OrderAny, instrument: &InstrumentAny, trade_id: Option<TradeId>, position_id: Option<PositionId>, last_px: Option<Price>, last_qty: Option<Quantity>, liquidity_side: Option<LiquiditySide>, commission: Option<Money>, ts_filled_ns: Option<UnixNanos>, account_id: Option<AccountId>, ) -> OrderEventAny
§Panics
Panics if parsing the fallback price string fails or unwrapping default values fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestOrderEventStubs
impl RefUnwindSafe for TestOrderEventStubs
impl Send for TestOrderEventStubs
impl Sync for TestOrderEventStubs
impl Unpin for TestOrderEventStubs
impl UnwindSafe for TestOrderEventStubs
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> 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