Skip to main content

Simulator

Trait Simulator 

Source
pub trait Simulator: Send + Sync {
    // Required methods
    fn simulate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 SimulationRequest,
    ) -> Pin<Box<dyn Future<Output = Result<SimulationResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn supported_chains(&self) -> Vec<String>;
}
Expand description

Trait for implementing simulators

Required Methods§

Source

fn simulate<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SimulationRequest, ) -> Pin<Box<dyn Future<Output = Result<SimulationResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Simulate a trade

Source

fn supported_chains(&self) -> Vec<String>

Get supported chains

Implementors§