#[non_exhaustive]pub enum Error {
Show 16 variants
UnexpectedEof {
needed: usize,
remaining: usize,
},
InvalidBoolean(u8),
InvalidByteOrder(u8),
StringNotTerminated,
InvalidUtf8,
InvalidUtf16,
InvalidWcharLength(u8),
OddWstringLength(u32),
WcharNotSupported,
LengthTooLarge {
len: u32,
remaining: usize,
},
LengthOverflow(usize),
EmptyEncapsulation,
InvalidEnumValue(u32),
InvalidTypeCode(&'static str),
InvalidValue(&'static str),
InvalidXcdr(&'static str),
}Expand description
Errors raised while encoding or decoding CDR.
A decoding error corresponds to CORBA::MARSHAL at the ORB level.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnexpectedEof
The stream ended before a value was complete.
InvalidBoolean(u8)
A boolean octet was neither 0 nor 1.
InvalidByteOrder(u8)
A byte order flag was neither 0 nor 1.
StringNotTerminated
A string did not end with a NUL octet.
InvalidUtf8
A string was not valid UTF-8.
InvalidUtf16
A wchar or wstring was not valid UTF-16.
InvalidWcharLength(u8)
A GIOP 1.2 wchar had an octet length other than 2 or 4 (with BOM).
OddWstringLength(u32)
A GIOP 1.2 wstring had an odd octet length.
WcharNotSupported
wchar and wstring cannot be used with this encoding (GIOP 1.0).
LengthTooLarge
A sequence or string length is larger than the bytes left.
LengthOverflow(usize)
A length does not fit in an unsigned long.
EmptyEncapsulation
An encapsulation had no byte order octet.
InvalidEnumValue(u32)
An enum or union discriminator had an unknown value.
InvalidTypeCode(&'static str)
A TypeCode was malformed: an unknown kind, an indirection that points nowhere, invalid parameters, or nesting too deep. On the writing side, a TypeCode that cannot be written (an unresolved recursive placeholder).
InvalidValue(&'static str)
A valuetype was malformed: a bad value tag, chunk or end tag, or an
indirection that points nowhere. On the writing side, an
end_value without its begin_value.
InvalidXcdr(&'static str)
An XCDR header was malformed: an unknown encapsulation identifier, a DHEADER, EMHEADER or parameter length past the end of the data that holds it, or a length too large for its header. On the writing side, a member ID too large for its header.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()