pub trait StreamRefPayload: Send + 'static {
// Required methods
fn encode_stream_ref_payload(self) -> Vec<u8> ⓘ;
fn decode_stream_ref_payload(bytes: Vec<u8>) -> StreamResult<Self>
where Self: Sized;
// Provided methods
fn encode_stream_ref_payload_into(self, bytes: &mut Vec<u8>)
where Self: Sized { ... }
fn decode_stream_ref_payload_slice(bytes: &[u8]) -> StreamResult<Self>
where Self: Sized { ... }
}Expand description
Element payload codec used by the protobuf StreamRefs transport seam.
The built-in impls use stable big-endian primitive encodings, and the trait
is owned by datum-core so the protobuf seam is independent of any actor
transport.
Required Methods§
fn encode_stream_ref_payload(self) -> Vec<u8> ⓘ
fn decode_stream_ref_payload(bytes: Vec<u8>) -> StreamResult<Self>where
Self: Sized,
Provided Methods§
fn encode_stream_ref_payload_into(self, bytes: &mut Vec<u8>)where
Self: Sized,
fn decode_stream_ref_payload_slice(bytes: &[u8]) -> StreamResult<Self>where
Self: Sized,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".