Skip to main content

ExecMiddleware

Trait ExecMiddleware 

Source
pub trait ExecMiddleware: Send + Sync {
    // Required method
    fn run<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        input: OperatorInput,
        spec: &'life1 EnvironmentSpec,
        next: &'life2 dyn ExecNext,
    ) -> Pin<Box<dyn Future<Output = Result<OperatorOutput, EnvError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Middleware wrapping Environment::run.

Use for: credential injection, isolation upgrades, resource enforcement.

Required Methods§

Source

fn run<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, input: OperatorInput, spec: &'life1 EnvironmentSpec, next: &'life2 dyn ExecNext, ) -> Pin<Box<dyn Future<Output = Result<OperatorOutput, EnvError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Intercept an environment execution.

Implementors§