pub trait SendRequests<ExchangeKey = ExchangeIndex, InstrumentKey = InstrumentIndex> {
// Required methods
fn send_requests<Kind>(
&self,
requests: impl IntoIterator<Item = OrderEvent<Kind, ExchangeKey, InstrumentKey>>,
) -> SendRequestsOutput<Kind, ExchangeKey, InstrumentKey>
where Kind: Debug + Clone,
ExecutionRequest<ExchangeKey, InstrumentKey>: From<OrderEvent<Kind, ExchangeKey, InstrumentKey>>;
fn send_request<Kind>(
&self,
request: &OrderEvent<Kind, ExchangeKey, InstrumentKey>,
) -> Result<(), EngineError>
where Kind: Debug + Clone,
ExecutionRequest<ExchangeKey, InstrumentKey>: From<OrderEvent<Kind, ExchangeKey, InstrumentKey>>;
}Expand description
Trait that defines how the Engine sends order requests.
§Type Parameters
ExchangeKey- Type used to identify an exchange (defaults toExchangeIndex).InstrumentKey- Type used to identify an instrument (defaults toInstrumentIndex).
Required Methods§
fn send_requests<Kind>(
&self,
requests: impl IntoIterator<Item = OrderEvent<Kind, ExchangeKey, InstrumentKey>>,
) -> SendRequestsOutput<Kind, ExchangeKey, InstrumentKey>where
Kind: Debug + Clone,
ExecutionRequest<ExchangeKey, InstrumentKey>: From<OrderEvent<Kind, ExchangeKey, InstrumentKey>>,
fn send_request<Kind>(
&self,
request: &OrderEvent<Kind, ExchangeKey, InstrumentKey>,
) -> Result<(), EngineError>where
Kind: Debug + Clone,
ExecutionRequest<ExchangeKey, InstrumentKey>: From<OrderEvent<Kind, ExchangeKey, InstrumentKey>>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".