Trait crux_core::capability::Operation

source ·
pub trait Operation:
    Serialize
    + Clone
    + PartialEq
    + Send
    + 'static {
    type Output: DeserializeOwned + Send + 'static;
}
Expand description

Operation trait links together input and output of a side-effect.

You implement Operation on the payload sent by the capability to the shell using CapabilityContext::request_from_shell.

For example (from crux_http):

impl Operation for HttpRequest {
    type Output = HttpResponse;
}

Required Associated Types§

source

type Output: DeserializeOwned + Send + 'static

Output assigns the type this request results in.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Operation for Never

Implement Operation for Never to allow using it as a capability operation.

source§

impl Operation for RenderOperation