Skip to main content

OrdersBackend

Trait OrdersBackend 

Source
pub trait OrdersBackend<IS: InstrumentSpec> {
    // Required methods
    fn new<OrdersCS: OrdersCapacitySpec, MDDP: MarketDataDecoderProvider<IS>>(
        market_data_decoder: Option<MDDP::MarketDataDecoder>,
    ) -> impl Future<Output = (Receiver<OrdersBackendUpdate<IS>, OrdersBackendUpdateRecycle>, Self)>
       where Self: Sized;
    fn submit_order(
        &mut self,
        local_order_id: &LocalOrderId,
        client_submission_timestamp: &Timestamp,
        remote_order: RemoteOrder<IS>,
    ) -> impl Future<Output = Result<(), OrdersBackendSubmitRemoteOrderError>>;
    fn modify_order_volume(
        &mut self,
        remote_order_id: &RemoteOrderId,
        volume: &DirectionlessVolume<IS>,
    ) -> impl Future<Output = ()>;
    fn initiate_cancel_order(
        &mut self,
        remote_order_id: &RemoteOrderId,
    ) -> impl Future<Output = Result<(), CancelRemoteOrderError>>;
    fn initiate_cancel_all(&mut self) -> impl Future<Output = ()>;
    fn initiate_cancel_flatten_all(&mut self) -> impl Future<Output = ()>;
}

Required Methods§

Source

fn new<OrdersCS: OrdersCapacitySpec, MDDP: MarketDataDecoderProvider<IS>>( market_data_decoder: Option<MDDP::MarketDataDecoder>, ) -> impl Future<Output = (Receiver<OrdersBackendUpdate<IS>, OrdersBackendUpdateRecycle>, Self)>
where Self: Sized,

Source

fn submit_order( &mut self, local_order_id: &LocalOrderId, client_submission_timestamp: &Timestamp, remote_order: RemoteOrder<IS>, ) -> impl Future<Output = Result<(), OrdersBackendSubmitRemoteOrderError>>

Source

fn modify_order_volume( &mut self, remote_order_id: &RemoteOrderId, volume: &DirectionlessVolume<IS>, ) -> impl Future<Output = ()>

Source

fn initiate_cancel_order( &mut self, remote_order_id: &RemoteOrderId, ) -> impl Future<Output = Result<(), CancelRemoteOrderError>>

Source

fn initiate_cancel_all(&mut self) -> impl Future<Output = ()>

Source

fn initiate_cancel_flatten_all(&mut self) -> impl Future<Output = ()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<IS: InstrumentSpec, CapacitySpec: CapacitySpec, PhysicalLocationLD: PhysicalLocationLD, OrderRouterLD: OrderRouterLD, ExchangeLD: ExchangeLD> OrdersBackend<IS> for SimulatedOrdersBackend<IS, CapacitySpec, PhysicalLocationLD, OrderRouterLD, ExchangeLD>