Skip to main content

Outbox

Trait Outbox 

Source
pub trait Outbox: Send + Sync {
    // Required methods
    fn send(
        &self,
        op: ClientOp,
    ) -> Pin<Box<dyn Future<Output = Result<(), NetError>> + Send + '_>>;
    fn request(
        &self,
        op: ClientOp,
    ) -> Pin<Box<dyn Future<Output = Result<ResBody, NetError>> + Send + '_>>;
}
Expand description

Where lifecycle frames leave the dispatcher.

send completes once the frame is on the wire. The ready report awaits this before the payload reaches the agent, which is the causal order §6 fixes.

Required Methods§

Source

fn send( &self, op: ClientOp, ) -> Pin<Box<dyn Future<Output = Result<(), NetError>> + Send + '_>>

Source

fn request( &self, op: ClientOp, ) -> Pin<Box<dyn Future<Output = Result<ResBody, NetError>> + Send + '_>>

One request round trip, for a caller that needs the server’s answer rather than a queued frame: the local CLI reports the verdict a send got.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§