pub trait AsyncExecute<S: Symbolic + Send + Sync>: Alphabet<S> + StreamExt<Item = Instruction<S>> + Stateful<State> + Unpin {
    type Driver: Future + Scope<S> + Send + Sync;
    type Error: Send + Sync;

    // Required methods
    fn scope(&self) -> &Arc<Mutex<Self::Driver>>;
    fn scope_mut(&mut self) -> &mut Arc<Mutex<Self::Driver>>;

    // Provided method
    fn execute<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<&Arc<Mutex<Self::Driver>>, Self::Error>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

AsyncExecute describes a self-contained executor that can be executed asynchronously.

Required Associated Types§

Required Methods§

source

fn scope(&self) -> &Arc<Mutex<Self::Driver>>

Returns a reference to the scope

source

fn scope_mut(&mut self) -> &mut Arc<Mutex<Self::Driver>>

Returns a mutable reference to the scope

Provided Methods§

source

fn execute<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<&Arc<Mutex<Self::Driver>>, Self::Error>> + Send + 'async_trait>>where Self: Send + 'async_trait, 'life0: 'async_trait,

Implementors§