ApiOperation

Trait ApiOperation 

Source
pub trait ApiOperation<C, P> {
    type Output;
    type Error;

    // Required method
    fn execute(
        context: &mut C,
        parameters: &P,
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

Core trait that all API operations implement.

Required Associated Types§

Source

type Output

The type returned by a successful operation execution.

Source

type Error

The error type returned when an operation fails.

Required Methods§

Source

fn execute(context: &mut C, parameters: &P) -> Result<Self::Output, Self::Error>

Execute the API operation with the given context and properties.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§