#[repr(C)]pub struct OrderFactory { /* private fields */ }
Implementations§
Source§impl OrderFactory
impl OrderFactory
Sourcepub fn new(
trader_id: TraderId,
strategy_id: StrategyId,
init_order_id_count: Option<usize>,
init_order_list_id_count: Option<usize>,
clock: &'static AtomicTime,
) -> Self
pub fn new( trader_id: TraderId, strategy_id: StrategyId, init_order_id_count: Option<usize>, init_order_list_id_count: Option<usize>, clock: &'static AtomicTime, ) -> Self
Creates a new OrderFactory
instance.
pub fn set_client_order_id_count(&mut self, count: usize)
pub fn set_order_list_id_count(&mut self, count: usize)
pub fn generate_client_order_id(&mut self) -> ClientOrderId
pub fn generate_order_list_id(&mut self) -> OrderListId
pub fn reset_factory(&mut self)
pub fn market( &mut self, instrument_id: InstrumentId, order_side: OrderSide, quantity: Quantity, time_in_force: Option<TimeInForce>, reduce_only: Option<bool>, quote_quantity: Option<bool>, exec_algorithm_id: Option<ExecAlgorithmId>, exec_algorithm_params: Option<HashMap<Ustr, Ustr>>, tags: Option<Vec<Ustr>>, client_order_id: Option<ClientOrderId>, ) -> OrderAny
Auto Trait Implementations§
impl Freeze for OrderFactory
impl RefUnwindSafe for OrderFactory
impl Send for OrderFactory
impl Sync for OrderFactory
impl Unpin for OrderFactory
impl UnwindSafe for OrderFactory
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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