Trait Strategy

Source
pub trait Strategy<V> {
    // Required methods
    fn init<'life0, 'life1, 'async_trait>(
        &'life0 self,
        provider: AnvilProvider,
        signal: Signal,
        inspector: &'life1 mut Box<dyn Inspector<V>>,
        engine: Engine,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn process<'life0, 'life1, 'async_trait>(
        &'life0 self,
        provider: AnvilProvider,
        signal: Signal,
        inspector: &'life1 mut Box<dyn Inspector<V>>,
        engine: Engine,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Represents a strategy that can be run in an Arena.

Required Methods§

Source

fn init<'life0, 'life1, 'async_trait>( &'life0 self, provider: AnvilProvider, signal: Signal, inspector: &'life1 mut Box<dyn Inspector<V>>, engine: Engine, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Initialization function for ths strategy to be run upon simulation startup.

Source

fn process<'life0, 'life1, 'async_trait>( &'life0 self, provider: AnvilProvider, signal: Signal, inspector: &'life1 mut Box<dyn Inspector<V>>, engine: Engine, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Processing function for the strategy to be run each simulation step.

Implementors§