Skip to main content

ActionOffload

Trait ActionOffload 

Source
pub trait ActionOffload: Send + Sync {
    // Required method
    fn offload(&self, request: OffloadRequest) -> OffloadFuture<'_>;

    // Provided method
    fn offload_invocation(
        &self,
        request: OffloadRequest,
        invocation: InvokeRequest,
    ) -> OffloadFuture<'_> { ... }
}
Expand description

The device’s route for offloadable invocations.

Required Methods§

Source

fn offload(&self, request: OffloadRequest) -> OffloadFuture<'_>

Run request on the best-placed other device, or say why it should run here.

Provided Methods§

Source

fn offload_invocation( &self, request: OffloadRequest, invocation: InvokeRequest, ) -> OffloadFuture<'_>

Self::offload for the invocation request was admitted from, as this device’s API would send it to another device: a route that runs it elsewhere sends the invocation the person made, so the device that runs it answers that one and a retry there is not a second run. A route with no device to send it to keeps its own way of running it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§