pub enum SerializationError {
Custom {
message: String,
},
Failure {
what: String,
cause: Box<CompatSerializationError>,
},
IoError {
what: String,
cause: Error,
},
MapIsNotSupported,
OpaqueDataIsTooLong {
length: usize,
},
SequenceOrTupleFatalError {
type_name: String,
},
StructFatalError {
name: String,
},
SequenceTooLong {
length: usize,
},
SequenceWithUnknownLength,
StringIsNotAscii {
string: String,
},
StringIsTooLong {
string: String,
},
}
Expand description
Error during serialization.
Variants§
Custom
Custom error message.
Failure
Failure to serialize a value.
Fields
§
cause: Box<CompatSerializationError>
The error that ocurred during serialization.
IoError
IO error while serializing a value.
Fields
MapIsNotSupported
Map types are not supported by XDR.
OpaqueDataIsTooLong
Attempt to serialize opaque data with too many bytes.
SequenceOrTupleFatalError
Fatal error while serializing a sequence or a tuple.
This is probably caused by ignoring a previous error.
StructFatalError
Fatal error while serializing an object.
This is probably caused by ignoring a previous error.
SequenceTooLong
Attempt to serialize a sequence that’s too long.
SequenceWithUnknownLength
Sequences with unknown lengths are not supported.
StringIsNotAscii
Only ASCII strings can be serialized.
StringIsTooLong
Attempt to serialize a string that’s too long.
Trait Implementations§
Source§impl Debug for SerializationError
impl Debug for SerializationError
Source§impl Display for SerializationError
impl Display for SerializationError
Source§impl Fail for SerializationError
impl Fail for SerializationError
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<CompatSerializationError> for SerializationError
impl From<CompatSerializationError> for SerializationError
Source§fn from(wrapped_error: CompatSerializationError) -> Self
fn from(wrapped_error: CompatSerializationError) -> Self
Converts to this type from the input type.
Source§impl From<SerializationError> for CompatSerializationError
impl From<SerializationError> for CompatSerializationError
Source§fn from(error: SerializationError) -> Self
fn from(error: SerializationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SerializationError
impl !RefUnwindSafe for SerializationError
impl Send for SerializationError
impl Sync for SerializationError
impl Unpin for SerializationError
impl !UnwindSafe for SerializationError
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