[][src]Enum serde_scale::Error

pub enum Error<E> {
    FloatingPointUnsupported,
    TooManyVariants {
        enum_name: &'static str,
        variant_name: &'static str,
        variant_index: u32,
    },
    LengthNeeded,
    TypeMustBeKnown,
    ExpectedBoolean {
        found: u8,
    },
    InvalidCharacter {
        found: u32,
    },
    CollectionTooLargeToSerialize {
        len: usize,
    },
    CollectionTooLargeToDeserialize,
    InvalidUnicode(Utf8Error),
    InvalidOption {
        found_discriminant: u8,
    },
    Io(E),
    Other(OtherError),
}

Serialization errors

Variants

FloatingPointUnsupported

SCALE does not specify how to serialize floating point values

TooManyVariants

SCALE limits enums to 255 variants

Fields of TooManyVariants

enum_name: &'static strvariant_name: &'static strvariant_index: u32
LengthNeeded

SCALE requires knowing the length of collections

TypeMustBeKnown

SCALE requires knowing the type of the data being deserialized

ExpectedBoolean

A boolean value (0 or 1) was expected but another byte was found

Fields of ExpectedBoolean

found: u8
InvalidCharacter

Invalid character found. Characters must be UTF-32 code points.

Fields of InvalidCharacter

found: u32
CollectionTooLargeToSerialize

This implementation limits collections to 2^64 elements

Fields of CollectionTooLargeToSerialize

len: usize
CollectionTooLargeToDeserialize

This implementation limits collections to 2^64 elements

InvalidUnicode(Utf8Error)

Invalid Unicode was found in a string

InvalidOption

An option was expected but the discriminant is invalid

Fields of InvalidOption

found_discriminant: u8
Io(E)

I/O error from the underlying reader or writer

Other(OtherError)

Other error the serializer or deserializer might encounter

Trait Implementations

impl<E: Debug> Debug for Error<E>[src]

impl<E: Display> Display for Error<E>[src]

impl<E: Debug + Display> Error for Error<E>[src]

impl<E: Debug + Display> Error for Error<E>[src]

impl<E: Debug + Display> Error for Error<E>[src]

impl<E> From<E> for Error<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for Error<E> where
    E: RefUnwindSafe

impl<E> Send for Error<E> where
    E: Send

impl<E> Sync for Error<E> where
    E: Sync

impl<E> Unpin for Error<E> where
    E: Unpin

impl<E> UnwindSafe for Error<E> where
    E: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<!> for T[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.