pub trait InvocationCodec: Sized {
const OPERATION: &'static str;
// Required methods
fn encode_invocation(&self) -> Result<Vec<u8>, String>;
fn decode_invocation(payload: &[u8]) -> Result<Self, String>;
}Expand description
A runtime-owned typed payload codec.
Orbit selects no serializer. Implementations may use a compact binary schema, a language value codec or an existing framework wire format.
Required Associated Constants§
Required Methods§
fn encode_invocation(&self) -> Result<Vec<u8>, String>
fn decode_invocation(payload: &[u8]) -> Result<Self, String>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".