[][src]Enum bincode::ErrorKind

pub enum ErrorKind {
    Io(Error),
    InvalidUtf8Encoding(Utf8Error),
    InvalidBoolEncoding(u8),
    InvalidCharEncoding,
    InvalidTagEncoding(usize),
    DeserializeAnyNotSupported,
    SizeLimit,
    SequenceMustHaveLength,
    Custom(String),
}

The kind of error that can be produced during a serialization or deserialization.

Variants

If the error stems from the reader/writer that is being used during (de)serialization, that error will be stored and returned here.

Returned if the deserializer attempts to deserialize a string that is not valid utf8

Returned if the deserializer attempts to deserialize a bool that was not encoded as either a 1 or a 0

Returned if the deserializer attempts to deserialize a char that is not in the correct format.

Returned if the deserializer attempts to deserialize the tag of an enum that is not in the expected ranges

Serde has a deserialize_any method that lets the format hint to the object which route to take in deserializing.

If (de)serializing a message takes more than the provided size limit, this error is returned.

Bincode can not encode sequences of unknown length (like iterators).

A custom error message from Serde.

Trait Implementations

impl Display for ErrorKind
[src]

Formats the value using the given formatter. Read more

impl Debug for ErrorKind
[src]

Formats the value using the given formatter. Read more

impl Error for ErrorKind
[src]

This method is soft-deprecated. Read more

Deprecating in 1.33.0

: replaced by Error::source, which can support downcasting

The lower-level cause of this error, if any. Read more

The lower-level source of this error, if any. Read more

Auto Trait Implementations

impl Send for ErrorKind

impl Sync for ErrorKind

Blanket Implementations

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

Converts the given value to a String. Read more

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more