Skip to main content

CapabilityExecutor

Trait CapabilityExecutor 

Source
pub trait CapabilityExecutor: Send + Sync {
    // Required method
    fn execute(
        &self,
        capability: &ExecutorCapability,
        input: &Value,
    ) -> Result<ExecutorOutput, ExecutorError>;
}
Expand description

Trait implemented by all capability executors.

Executors are stateless; all context is passed per call.

Required Methods§

Source

fn execute( &self, capability: &ExecutorCapability, input: &Value, ) -> Result<ExecutorOutput, ExecutorError>

Execute capability with input, returning the output or an error.

§Errors

Returns ExecutorError when execution cannot be completed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§