Skip to main content

Operation

Trait Operation 

Source
pub trait Operation:
    OperationDeclaration<Request = Self>
    + Portable
    + Streams
    + Dependent
    + Clone
    + Send
    + 'static {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn run(
        self,
        context: Context<'_, Self>,
    ) -> impl Future<Output = Result<Response<Self::Response>, Self::Error>> + Send;

    // Provided method
    fn classify(_error: &Self::Error) -> FailureKind { ... }
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn run( self, context: Context<'_, Self>, ) -> impl Future<Output = Result<Response<Self::Response>, Self::Error>> + Send

Provided Methods§

Source

fn classify(_error: &Self::Error) -> FailureKind

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§