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

Custom error message.

Fields of Custom

The message of the custom error.

Failure to serialize a value.

Fields of Failure

A description of what was being serialized.

The error that ocurred during serialization.

IO error while serializing a value.

Fields of IoError

A description of what was being serialized.

The error that ocurred during serialization.

Map types are not supported by XDR.

Attempt to serialize opaque data with too many bytes.

Fields of OpaqueDataIsTooLong

The length of the data, which is larger than what can be represented.

Fatal error while serializing a sequence or a tuple.

This is probably caused by ignoring a previous error.

Fields of SequenceOrTupleFatalError

The name of the type being serialized.

Fatal error while serializing an object.

This is probably caused by ignoring a previous error.

Fields of StructFatalError

The name of the type being serialized.

Attempt to serialize a sequence that's too long.

Fields of SequenceTooLong

The length of the sequence, which is larger than what can be represented.

Sequences with unknown lengths are not supported.

Only ASCII strings can be serialized.

Fields of StringIsNotAscii

The string that can't be represented as an ASCII string.

Attempt to serialize a string that's too long.

Fields of StringIsTooLong

The length of the string, which is larger than what can be represented.

Trait Implementations

impl Debug for SerializationError
[src]

[src]

Formats the value using the given formatter.

impl Fail for SerializationError
[src]

[src]

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

[src]

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

[src]

Provides context for this failure. Read more

[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

[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

[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]

[src]

Formats the value using the given formatter. Read more

impl From<CompatSerializationError> for SerializationError
[src]

[src]

Performs the conversion.