pub struct OrderManager { /* private fields */ }
Implementations§
Source§impl OrderManager
impl OrderManager
pub fn new( clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, active_local: bool, ) -> 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 const fn modify_order_quantity( &mut self, order: &mut OrderAny, new_quantity: Quantity, )
Sourcepub fn create_new_submit_order(
&mut self,
order: &OrderAny,
position_id: Option<PositionId>,
client_id: Option<ClientId>,
) -> Result<()>
pub fn create_new_submit_order( &mut self, order: &OrderAny, position_id: Option<PositionId>, client_id: Option<ClientId>, ) -> Result<()>
§Errors
Returns an error if creating a new submit order fails.
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)
Sourcepub fn handle_order_filled(&mut self, filled: OrderFilled)
pub fn handle_order_filled(&mut self, filled: OrderFilled)
§Panics
Panics if the OTO child order cannot be found for the given client order ID.
Sourcepub fn handle_contingencies(&mut self, order: OrderAny)
pub fn handle_contingencies(&mut self, order: OrderAny)
§Panics
Panics if a contingent order cannot be found for the given client order ID.
Sourcepub fn handle_contingencies_update(&mut self, order: OrderAny)
pub fn handle_contingencies_update(&mut self, order: OrderAny)
§Panics
Panics if an OCO contingent order cannot be found for the given client order ID.
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)
Trait Implementations§
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