pub struct OrderManager { /* private fields */ }
Implementations§
Source§impl OrderManager
impl OrderManager
pub fn new( clock: Rc<RefCell<dyn Clock>>, msgbus: Rc<RefCell<MessageBus>>, cache: Rc<RefCell<Cache>>, active_local: bool, submit_order_handler: Option<fn(_: &SubmitOrder)>, cancel_order_handler: Option<fn(_: &OrderAny)>, modify_order_handler: Option<fn(_: &OrderAny, _: Quantity)>, ) -> Self
pub fn get_submit_order_commands(&self) -> HashMap<ClientOrderId, SubmitOrder>
pub fn cache_submit_order_command(&mut self, command: SubmitOrder)
pub fn pop_submit_order_command( &mut self, client_order_id: ClientOrderId, ) -> Option<SubmitOrder>
pub fn reset(&mut self)
pub fn cancel_order(&mut self, order: OrderAny)
pub fn modify_order_quantity(&mut self, order: OrderAny, new_quantity: Quantity)
pub fn create_new_submit_order( &mut self, order: OrderAny, position_id: Option<PositionId>, client_id: Option<ClientId>, ) -> Result<()>
pub fn should_manage_order(&self, order: &OrderAny) -> bool
pub fn handle_event(&mut self, event: OrderEventAny)
pub fn handle_order_rejected(&mut self, rejected: OrderRejected)
pub fn handle_order_canceled(&mut self, canceled: OrderCanceled)
pub fn handle_order_expired(&mut self, expired: OrderExpired)
pub fn handle_order_updated(&mut self, updated: OrderUpdated)
pub fn handle_order_filled(&mut self, filled: OrderFilled)
pub fn handle_contingencies(&mut self, order: OrderAny)
pub fn handle_contingencies_update(&mut self, order: OrderAny)
pub fn handle_position_event(&mut self, _event: OrderEventAny)
pub fn send_emulator_command(&self, command: TradingCommand)
pub fn send_algo_command( &self, command: SubmitOrder, exec_algorithm_id: ExecAlgorithmId, )
pub fn send_risk_command(&self, command: TradingCommand)
pub fn send_exec_command(&self, command: TradingCommand)
pub fn send_risk_event(&self, event: OrderEventAny)
pub fn send_exec_event(&self, event: OrderEventAny)
Auto Trait Implementations§
impl Freeze for OrderManager
impl !RefUnwindSafe for OrderManager
impl !Send for OrderManager
impl !Sync for OrderManager
impl Unpin for OrderManager
impl !UnwindSafe for OrderManager
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