Skip to main content

Module stream_codec

Module stream_codec 

Source
Expand description

Serialization codec for streaming state.

The HTTP transport is stateless: every continuation request carries the serialized ProducerState / ExchangeState back to the server inside an HMAC-signed token, so any worker behind a load balancer can resume any stream. This module defines the trait for per-state-type encode/decode + a bincode-backed helper for the common case.

Pipe and unix transports hold state in memory and skip the codec entirely.

Traitsยง

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