Skip to main content

OperationDefinition

Trait OperationDefinition 

Source
pub trait OperationDefinition {
    type Parameters: Clone + Serialize + DeserializeOwned + Send + Sync + 'static;
    type Output: Clone + Serialize + DeserializeOwned + Send + Sync + 'static;

    // Required methods
    fn spec() -> OperationSpec;
    fn target(
        parameters: &Self::Parameters,
    ) -> Result<TargetRef, TargetRefError>;
}
Expand description

Typed definition implemented by a concrete infrastructure operation.

Required Associated Types§

Source

type Parameters: Clone + Serialize + DeserializeOwned + Send + Sync + 'static

Operation-specific request parameters.

Source

type Output: Clone + Serialize + DeserializeOwned + Send + Sync + 'static

Operation-specific successful output.

Required Methods§

Source

fn spec() -> OperationSpec

Returns the operation catalog specification.

Source

fn target(parameters: &Self::Parameters) -> Result<TargetRef, TargetRefError>

Resolves the request parameters to a typed target.

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§