pub struct ExecutionEngine { /* private fields */ }
Implementations§
Source§impl ExecutionEngine
impl ExecutionEngine
pub fn new( clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, config: Option<ExecutionEngineConfig>, ) -> Self
pub fn position_id_count(&self, strategy_id: StrategyId) -> usize
pub fn check_integrity(&self) -> bool
pub fn check_connected(&self) -> bool
pub fn check_disconnected(&self) -> bool
pub fn check_residuals(&self) -> bool
pub fn get_external_order_claims_instruments(&self) -> HashSet<InstrumentId>
Sourcepub fn register_client(&mut self, client: Rc<dyn ExecutionClient>) -> Result<()>
pub fn register_client(&mut self, client: Rc<dyn ExecutionClient>) -> Result<()>
Registers a new execution client.
§Errors
Returns an error if a client with the same ID is already registered.
pub fn register_default_client(&mut self, client: Rc<dyn ExecutionClient>)
pub fn get_client( &self, client_id: &ClientId, ) -> Option<Rc<dyn ExecutionClient>>
Sourcepub fn register_venue_routing(
&mut self,
client_id: ClientId,
venue: Venue,
) -> Result<()>
pub fn register_venue_routing( &mut self, client_id: ClientId, venue: Venue, ) -> Result<()>
Sets routing for a specific venue to a given client ID.
§Errors
Returns an error if the client ID is not registered.
Sourcepub fn deregister_client(&mut self, client_id: ClientId) -> Result<()>
pub fn deregister_client(&mut self, client_id: ClientId) -> Result<()>
§Errors
Returns an error if no client is registered with the given ID.
Sourcepub async fn load_cache(&mut self) -> Result<()>
pub async fn load_cache(&mut self) -> Result<()>
Loads persistent state into cache and rebuilds indices.
§Errors
Returns an error if any cache operation fails.
pub fn flush_db(&self)
pub fn process(&mut self, event: &OrderEventAny)
pub fn execute(&self, command: &TradingCommand)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionEngine
impl !RefUnwindSafe for ExecutionEngine
impl !Send for ExecutionEngine
impl !Sync for ExecutionEngine
impl Unpin for ExecutionEngine
impl !UnwindSafe for ExecutionEngine
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