Skip to main content

ReplyShape

Trait ReplyShape 

Source
pub trait ReplyShape: Send + Sync {
    type Wire;
}
Expand description

The shape and wire of a reply value: what payload it publishes, what typed header contract rides it, and whether the framework’s codec serializes it.

Implemented for every serde::Serialize type and every Message pair of them (the EncodedReply wire), and per-type for Serialized replies (the SerializedReply wire) - #[derive(Serialized)] writes that impl, or see Serialized for the hand-written form.

Required Associated Types§

Source

type Wire

The reply’s wire: EncodedReply or SerializedReply.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<H, P> ReplyShape for Message<H, P>
where H: Serialize + Send + Sync, P: Serialize + Send + Sync,

Source§

impl<R> ReplyShape for R
where R: Serialize + Send + Sync,