[][src]Enum serde_xdr::SerializationError

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

Custom error message.

Fields of Custom

message: String

The message of the custom error.

Failure

Failure 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.

IoError

IO 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.

MapIsNotSupported

Map types are not supported by XDR.

OpaqueDataIsTooLong

Attempt 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.

SequenceOrTupleFatalError

Fatal 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.

StructFatalError

Fatal 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.

SequenceTooLong

Attempt 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.

SequenceWithUnknownLength

Sequences with unknown lengths are not supported.

StringIsNotAscii

Only ASCII strings can be serialized.

Fields of StringIsNotAscii

string: String

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

StringIsTooLong

Attempt 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 Display for SerializationError[src]

impl Fail for SerializationError[src]

impl From<CompatSerializationError> for SerializationError[src]

impl From<SerializationError> for CompatSerializationError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.