pub enum CodecError {
HeaderTooShort,
UnsupportedVersion(u8),
ReservedTokenLength(u8),
TokenTruncated,
OptionHeaderTruncated,
OptionDeltaIs15,
OptionLengthIs15,
OptionValueTruncated,
PayloadMarkerWithoutPayload,
EncodeTokenTooLong,
}Expand description
Codec-Fehler — Spec-konform “MUST be processed as a message format error” Faelle.
Variants§
HeaderTooShort
Header zu kurz (< 4 Bytes).
UnsupportedVersion(u8)
Spec §3 — “Implementations MUST set this field to 1 (01 binary). Other values are reserved […]. Messages with unknown version numbers MUST be silently ignored.” Wir liefern dem Caller einen expliziten Fehler.
ReservedTokenLength(u8)
Spec §3 — “Lengths 9-15 are reserved, MUST NOT be sent, and MUST be processed as a message format error.”
TokenTruncated
Token reicht nicht in den verfuegbaren Bytes.
OptionHeaderTruncated
Option-Header reicht nicht in die verfuegbaren Bytes.
OptionDeltaIs15
Spec §3.1 — “15: Reserved for the Payload Marker. If the field is set to this value but the entire byte is not the payload marker, this MUST be processed as a message format error.”
OptionLengthIs15
Spec §3.1 — Option-Length 15 reserved.
OptionValueTruncated
Option-Value reicht nicht in den verfuegbaren Bytes.
PayloadMarkerWithoutPayload
Spec §3 — “The presence of a marker followed by a zero-length payload MUST be processed as a message format error.”
EncodeTokenTooLong
Token-Length ist > 8 beim Encode (Caller-Fehler).
Trait Implementations§
Source§impl Clone for CodecError
impl Clone for CodecError
Source§fn clone(&self) -> CodecError
fn clone(&self) -> CodecError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
Available on crate feature std only.
impl Error for CodecError
std only.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()
Source§impl PartialEq for CodecError
impl PartialEq for CodecError
Source§fn eq(&self, other: &CodecError) -> bool
fn eq(&self, other: &CodecError) -> bool
self and other values to be equal, and is used by ==.