Skip to main content

Execute

Trait Execute 

Source
pub trait Execute<Operation: Send>: Driver {
    type Output: Send;

    // Required method
    fn execute<'a>(
        &'a self,
        operation: Operation,
    ) -> impl Future<Output = Result<Self::Output, Self::Error>> + Send + 'a;
}
Expand description

Executes a specific operation on a Driver.

Implement this trait for each operation a driver supports. External crates can introduce their own operation types and implementations.

Required Associated Types§

Source

type Output: Send

Value produced by this operation.

Required Methods§

Source

fn execute<'a>( &'a self, operation: Operation, ) -> impl Future<Output = Result<Self::Output, Self::Error>> + Send + 'a

Executes the owned operation.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§