pub trait EnvelopeMapper<M> {
type Error: Error + Send + Sync + 'static;
// Required methods
fn encode(&self, envelope: &SerializedEnvelope) -> Result<M, Self::Error>;
fn decode(&self, message: M) -> Result<SerializedEnvelope, Self::Error>;
}Expand description
Converts a SerializedEnvelope to and from one transport’s native message type M.
No implementation ships from reliar-core — a mapper’s transport headers are a
projection of Metadata, not a second source of truth (ADR 0004).
The reserved reliar-* header names a mapper writes are a public contract (§14).
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".