pub trait Operation:
Serialize
+ Clone
+ PartialEq
+ Send
+ 'static {
type Output: DeserializeOwned + Send + Unpin + '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§
Sourcetype Output: DeserializeOwned + Send + Unpin + 'static
type Output: DeserializeOwned + Send + Unpin + 'static
Output
assigns the type this request results in.
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.