Skip to main content

NodeExecutor

Trait NodeExecutor 

Source
pub trait NodeExecutor: Send + Sync {
    // Required method
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        item: &'life1 WorkItem,
    ) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn execute_streaming<'life0, 'life1, 'async_trait>(
        &'life0 self,
        item: &'life1 WorkItem,
        _tx: StreamEventSender,
    ) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Trait implemented by each node kind executor.

Required Methods§

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, item: &'life1 WorkItem, ) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn execute_streaming<'life0, 'life1, 'async_trait>( &'life0 self, item: &'life1 WorkItem, _tx: StreamEventSender, ) -> Pin<Box<dyn Future<Output = Result<ExecutionResult, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute with streaming event emission. Default delegates to execute().

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§