pub enum DeserializationError {
Show 14 variants
Custom {
message: String,
},
Failure {
type_name: String,
cause: Box<CompatDeserializationError>,
},
IdentifierNotSupported,
InvalidBool {
raw_value: u32,
},
InvalidChar {
raw_value: u32,
},
InvalidEnumVariant {
variant: u32,
variants: &'static [&'static str],
},
InvalidInteger {
bits: u8,
value: i32,
},
InvalidOption,
InvalidString {
cause: FromUtf8Error,
},
InvalidUnsignedInteger {
bits: u8,
value: u32,
},
IoError {
type_name: String,
cause: Error,
},
MapIsNotSupported,
TupleHasTooManyElements {
length: usize,
},
UnknownType,
}
Expand description
Error during deserialization.
Variants§
Custom
Custom error message.
Failure
Failure while deserializing a value.
Fields
§
cause: Box<CompatDeserializationError>
The error that ocurred during deserialization.
IdentifierNotSupported
Deserialization of an identifier (for meta-data) is not supported.
InvalidBool
Deserialized boolean value is invalid.
InvalidChar
Deserialized character value is invalid.
InvalidEnumVariant
Deserialized enum variant is invalid.
InvalidInteger
Deserialized signed integer is invalid.
Fields
InvalidOption
Deserialized optional value is invalid.
InvalidString
Deserialized an invalid UTF-8 string.
Fields
§
cause: FromUtf8Error
The error that ocurred while converting the deserialized bytes into a string.
InvalidUnsignedInteger
Deserialized unsigned integer is invalid.
Fields
IoError
IO error while deserializing a value.
Fields
MapIsNotSupported
Map types are not supported by XDR.
TupleHasTooManyElements
Attempt to deserialize a tuple that has too many elements.
UnknownType
Attempt to deserialize an unknown type.
Implementations§
Trait Implementations§
Source§impl Debug for DeserializationError
impl Debug for DeserializationError
Source§impl Display for DeserializationError
impl Display for DeserializationError
Source§impl Fail for DeserializationError
impl Fail for DeserializationError
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreSource§impl From<CompatDeserializationError> for DeserializationError
impl From<CompatDeserializationError> for DeserializationError
Source§fn from(wrapped_error: CompatDeserializationError) -> Self
fn from(wrapped_error: CompatDeserializationError) -> Self
Converts to this type from the input type.
Source§impl From<DeserializationError> for CompatDeserializationError
impl From<DeserializationError> for CompatDeserializationError
Source§fn from(error: DeserializationError) -> Self
fn from(error: DeserializationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeserializationError
impl !RefUnwindSafe for DeserializationError
impl Send for DeserializationError
impl Sync for DeserializationError
impl Unpin for DeserializationError
impl !UnwindSafe for DeserializationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more