pub trait StrategyExecutor: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
decision: &'life2 StrategyDecision,
) -> Pin<Box<dyn Future<Output = ExchangeResult<Vec<Order>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A strategy executor that runs strategies against an exchange.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
decision: &'life2 StrategyDecision,
) -> Pin<Box<dyn Future<Output = ExchangeResult<Vec<Order>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
decision: &'life2 StrategyDecision,
) -> Pin<Box<dyn Future<Output = ExchangeResult<Vec<Order>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Executes the strategy decision, placing orders on the exchange.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".