pub enum SchemaError {
CdrRead(DeserError),
CdrWrite(SerError),
BufferTooSmall,
Truncated,
Malformed,
Unsupported(&'static str),
}Expand description
What can go wrong in a schema-driven encode or decode.
Deliberately separate from SerError / DeserError: those describe the
CDR side of a transcode, and a provider’s own wire has failure modes CDR
does not (a truncated foreign buffer, a length prefix that disagrees with
the schema).
Variants§
CdrRead(DeserError)
The CDR side failed while reading.
CdrWrite(SerError)
The CDR side failed while writing.
BufferTooSmall
The foreign buffer is too small to hold the encoding.
Truncated
The foreign buffer ended in the middle of a value.
Malformed
The foreign buffer disagrees with the schema — a length prefix past a declared bound, a bool that is not 0 or 1, invalid UTF-8.
Unsupported(&'static str)
A schema shape this walk cannot express, with the reason.
Never a silent skip: a field that cannot be walked ends the encode, because a partial message on the wire is worse than no message.
Trait Implementations§
Source§impl Clone for SchemaError
impl Clone for SchemaError
Source§fn clone(&self) -> SchemaError
fn clone(&self) -> SchemaError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more