#[non_exhaustive]pub enum WireFormatError {
VersionMismatch {
got: u16,
expected: u16,
},
InvalidMagic,
KindMismatch {
got: u8,
expected: u8,
},
UnsupportedKind {
kind: u8,
},
UnsupportedFlags {
flags: u8,
},
TypeNameMismatch {
got: String,
expected: &'static str,
},
MalformedHeader(String),
Codec(String),
}Expand description
Errors produced by Sassi’s binary wire container.
Sassi values cross runtime and process boundaries inside a fixed
binary header followed by a postcard-encoded body. The header
captures the wire major, kind discriminator, optional flags, and the
cached type name so readers can reject incompatible payloads before
touching the body. Postcard’s own error type is intentionally not
part of the public surface — its detail is folded into Codec so
the wire format can evolve without leaking the codec choice.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
VersionMismatch
The wire major is not understood by this crate.
Fields
InvalidMagic
The byte stream does not start with Sassi’s wire magic.
KindMismatch
The byte stream is a different Sassi wire kind than the caller expected.
Fields
UnsupportedKind
The byte stream uses a reserved or unsupported wire kind.
UnsupportedFlags
The byte stream sets flags this crate does not understand.
TypeNameMismatch
The header names a different cached type.
Fields
MalformedHeader(String)
The fixed header or variable type-name segment is malformed.
Codec(String)
The postcard body failed to encode or decode.
Trait Implementations§
Source§impl Debug for WireFormatError
impl Debug for WireFormatError
Source§impl Display for WireFormatError
impl Display for WireFormatError
Source§impl Error for WireFormatError
impl Error for WireFormatError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()