pub enum DecodeError {
UnexpectedEof {
needed: usize,
offset: usize,
},
InvalidUtf8 {
offset: usize,
},
InvalidBool {
value: u8,
offset: usize,
},
InvalidChar {
value: u32,
offset: usize,
},
LengthExceeded {
announced: usize,
remaining: usize,
offset: usize,
},
InvalidString {
offset: usize,
reason: &'static str,
},
InvalidEnum {
kind: &'static str,
value: u32,
},
UnknownMustUnderstandMember {
member_id: u32,
},
MissingNonOptionalMember {
member_id: u32,
},
}Expand description
Fehler beim Decoden eines Werts.
Variants§
UnexpectedEof
Eingabe endete vor dem erwarteten Ende.
Fields
InvalidUtf8
UTF-8-Validierung fuer einen String-Wert ist fehlgeschlagen.
InvalidBool
Boolean-Byte war weder 0 noch 1 — XCDR-Spec verbietet das.
InvalidChar
Char-Wert ist kein gueltiger Unicode-Codepoint.
LengthExceeded
Sequence-/Array-Laenge ueberschreitet Bound oder die noch vorhandenen Bytes.
Fields
InvalidString
String-Format-Verletzung (z.B. Null-Terminator fehlt, Laenge 0).
Fields
InvalidEnum
Unbekannter/ungueltiger Enum-Discriminator — wird von Policy- Decodern genutzt, die strict-mode operieren (z.B. QoS-Enums).
Fields
UnknownMustUnderstandMember
Mutable-Decode hat einen must_understand-Member mit unbekannter
Member-ID gelesen (XTypes 1.3 §7.4.1.2.3 — Receiver MUSS in dem
Fall die Message verwerfen).
MissingNonOptionalMember
Mutable-Decode hat einen non-optional Member nicht im Wire gefunden (XTypes 1.3 §7.4.1.2.3).
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
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 DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
Available on crate feature std only.
impl Error for DecodeError
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 DecodeError
impl PartialEq for DecodeError
Source§fn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
self and other values to be equal, and is used by ==.