Skip to main content

Module error

Module error 

Source
Expand description

Protocol-layer error type.

ProtocolError surfaces the two bad-prefix cases the codec checks before invoking postcard (ProtocolError::BadMagic and ProtocolError::BadVersion) as first-class variants, alongside transparent passthroughs for the underlying postcard::Error and bibeam_core::Error.

Lifting bad-magic / bad-version out of the generic postcard::Error::DeserializeBadEncoding bucket lets callers (the transport layer, the coordinator, observability code) match on the root cause without string-sniffing.

Enumsยง

ProtocolError
Protocol-layer error returned by crate::decode and by callers that wrap codec failures.