Enum bincode_core::DeserializeError[][src]

pub enum DeserializeError<'a, R: CoreRead<'a>> {
    Read(R::Error),
    InvalidBoolValue(u8),
    InvalidCharEncoding,
    Utf8(Utf8Error),
    InvalidOptionValue(u8),
    LimitError(LimitError),
    InvalidCast {
        from_type: &'static str,
        to_type: &'static str,
    },
    InvalidUtf8Encoding(Utf8Error),
    InvalidValueRange,
    ExtensionPoint,
}

Errors that can occur while deserializing

Variants

Read(R::Error)

Failed to read from the provided CoreRead. The inner exception is given.

InvalidBoolValue(u8)

Invalid bool value. Only 0 and 1 are valid values.

InvalidCharEncoding

Invalid character encoding while trying to deserialize a &str.

Utf8(Utf8Error)

UTF8 error while trying to deserialize a &str

InvalidOptionValue(u8)

Invalid value for the Option part of Option<T>. Only 0 and 1 are accepted values.

LimitError(LimitError)

Limit error reached. See the inner exception for more info.

InvalidCast

Could not cast from type from_type to type to_type. Usually this means that the data is encoded with a different version or protocol.

Fields of InvalidCast

from_type: &'static str

The base type that was being casted from

to_type: &'static str

The target type that was being casted to

InvalidUtf8Encoding(Utf8Error)

Invalid UTF8 encoding while trying to parse a &str or String

InvalidValueRange

Invalid value (u128 range): you may have a version or configuration disagreement?

ExtensionPoint

Byte 255 is treated as an extension point; it should not be encoding anything. Do you have a mismatched bincode version or configuration?

Trait Implementations

impl<'a, R: CoreRead<'a>> Debug for DeserializeError<'a, R>[src]

impl<'a, R: CoreRead<'a>> Display for DeserializeError<'a, R>[src]

impl<'a, R: CoreRead<'a>> Error for DeserializeError<'a, R>[src]

impl<'a, R: CoreRead<'a>> Error for DeserializeError<'a, R>[src]

impl<'a, R: CoreRead<'a>> From<Utf8Error> for DeserializeError<'a, R>[src]

Auto Trait Implementations

impl<'a, R> RefUnwindSafe for DeserializeError<'a, R> where
    <R as CoreRead<'a>>::Error: RefUnwindSafe

impl<'a, R> Send for DeserializeError<'a, R> where
    <R as CoreRead<'a>>::Error: Send

impl<'a, R> Sync for DeserializeError<'a, R> where
    <R as CoreRead<'a>>::Error: Sync

impl<'a, R> Unpin for DeserializeError<'a, R> where
    <R as CoreRead<'a>>::Error: Unpin

impl<'a, R> UnwindSafe for DeserializeError<'a, R> where
    <R as CoreRead<'a>>::Error: 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<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.