Enum serde_xdr::SerializationError
[−]
[src]
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,
},
}Error during serialization.
Variants
CustomCustom error message.
Fields of Custom
message: String | The message of the custom error. |
FailureFailure to serialize a value.
Fields of Failure
what: String | A description of what was being serialized. |
cause: Box<CompatSerializationError> | The error that ocurred during serialization. |
IoErrorIO error while serializing a value.
Fields of IoError
what: String | A description of what was being serialized. |
cause: Error | The error that ocurred during serialization. |
MapIsNotSupportedMap types are not supported by XDR.
OpaqueDataIsTooLongAttempt to serialize opaque data with too many bytes.
Fields of OpaqueDataIsTooLong
length: usize | The length of the data, which is larger than what can be represented. |
SequenceOrTupleFatalErrorFatal error while serializing a sequence or a tuple.
This is probably caused by ignoring a previous error.
Fields of SequenceOrTupleFatalError
type_name: String | The name of the type being serialized. |
StructFatalErrorFatal error while serializing an object.
This is probably caused by ignoring a previous error.
Fields of StructFatalError
name: String | The name of the type being serialized. |
SequenceTooLongAttempt to serialize a sequence that's too long.
Fields of SequenceTooLong
length: usize | The length of the sequence, which is larger than what can be represented. |
SequenceWithUnknownLengthSequences with unknown lengths are not supported.
StringIsNotAsciiOnly ASCII strings can be serialized.
Fields of StringIsNotAscii
string: String | The string that can't be represented as an ASCII string. |
StringIsTooLongAttempt to serialize a string that's too long.
Fields of StringIsTooLong
string: String | The length of the string, which is larger than what can be represented. |
Trait Implementations
impl Debug for SerializationError[src]
impl Fail for SerializationError[src]
fn cause(&self) -> Option<&Fail>[src]
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>[src]
Returns a reference to the Backtrace carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static, [src]
D: Display + Send + Sync + 'static,
Provides context for this failure. Read more
fn compat(self) -> Compat<Self>[src]
Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more
fn causes(&self) -> Causes[src]
Returns a iterator over the causes of this Fail with itself as the first item and the root_cause as the final item. Read more
fn root_cause(&self) -> &(Fail + 'static)[src]
Returns the "root cause" of this Fail - the last value in the cause chain which does not return an underlying cause. Read more
impl Display for SerializationError[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl From<CompatSerializationError> for SerializationError[src]
fn from(wrapped_error: CompatSerializationError) -> Self[src]
Performs the conversion.