pub struct OrderFilledTestBuilder<'a> { /* private fields */ }Expand description
Fluent test builder for a crate::events::OrderFilled event derived from an order and instrument.
Implementations§
Source§impl<'a> OrderFilledTestBuilder<'a>
impl<'a> OrderFilledTestBuilder<'a>
Sourcepub fn new(order: &'a OrderAny, instrument: &'a InstrumentAny) -> Self
pub fn new(order: &'a OrderAny, instrument: &'a InstrumentAny) -> Self
Creates an order-derived crate::events::OrderFilled test builder.
Sourcepub fn position_id(&mut self, position_id: PositionId) -> &mut Self
pub fn position_id(&mut self, position_id: PositionId) -> &mut Self
Sets the position ID.
Sourcepub fn without_position_id(&mut self) -> &mut Self
pub fn without_position_id(&mut self) -> &mut Self
Omits the position ID.
Sourcepub fn liquidity_side(&mut self, liquidity_side: LiquiditySide) -> &mut Self
pub fn liquidity_side(&mut self, liquidity_side: LiquiditySide) -> &mut Self
Sets the liquidity side.
Sourcepub fn commission(&mut self, commission: Money) -> &mut Self
pub fn commission(&mut self, commission: Money) -> &mut Self
Sets the commission.
Sourcepub fn without_commission(&mut self) -> &mut Self
pub fn without_commission(&mut self) -> &mut Self
Omits the commission.
Sourcepub fn account_id(&mut self, account_id: AccountId) -> &mut Self
pub fn account_id(&mut self, account_id: AccountId) -> &mut Self
Sets the account ID.
Sourcepub fn build(&self) -> OrderEventAny
pub fn build(&self) -> OrderEventAny
Builds the OrderEventAny::Filled event.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for OrderFilledTestBuilder<'a>
impl<'a> RefUnwindSafe for OrderFilledTestBuilder<'a>
impl<'a> Send for OrderFilledTestBuilder<'a>
impl<'a> Sync for OrderFilledTestBuilder<'a>
impl<'a> Unpin for OrderFilledTestBuilder<'a>
impl<'a> UnsafeUnpin for OrderFilledTestBuilder<'a>
impl<'a> UnwindSafe for OrderFilledTestBuilder<'a>
Blanket Implementations§
impl<T> Allocation for T
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