Skip to main content

StreamStateCodec

Trait StreamStateCodec 

Source
pub trait StreamStateCodec: Sized {
    // Required methods
    fn encode(&self) -> Result<Vec<u8>>;
    fn decode(bytes: &[u8]) -> Result<Self>;
}
Expand description

Round-trip a streaming-state value through a byte representation.

Implementations choose their own format (bincode, Arrow IPC, etc.); the bytes are opaque to the HTTP transport which only signs and carries them.

Required Methods§

Source

fn encode(&self) -> Result<Vec<u8>>

Source

fn decode(bytes: &[u8]) -> Result<Self>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§