[]Enum cjdns_bencode::Error

pub enum Error {
    ArbitraryMapKeysUnsupported,
    MapSerializationCallOrder,
    InvalidBool(String),
    InvalidF32(usize),
    InvalidF64(usize),
    InvalidChar(usize),
    TrailingBytes,
    CustomEncode(String),
    CustomDecode(String),
    Encode(Error),
    Decode(Error),
}

An enumeration of potential errors that appear during serde serialiation and deserialization

Variants

ArbitraryMapKeysUnsupported

Error that occurs if a map with a key type which does not serialize to a byte string is encountered

MapSerializationCallOrder

Error that occurs if methods on MapSerializer are called out of order

InvalidBool(String)

Error that occurs if a bool is deserialized from an integer value other than 0 or 1

InvalidF32(usize)

Error that occurs if an f32 is deserialized from an string of length other than 4

InvalidF64(usize)

Error that occurs if an f64 is deserialized from an string of length other than 8

InvalidChar(usize)

Error that occurs if a char is deserialized from a string containing more than one character

TrailingBytes

Error that occurs if trailing bytes remain after deserialization, if the deserializer is configured to forbid trailing bytes

CustomEncode(String)

Error that occurs if a serde-related error occurs during serialization

CustomDecode(String)

Error that occurs if a serde-related error occurs during deserialization

Encode(Error)

Error that occurs if a problem is encountered during serialization

Decode(Error)

Error that occurs if a problem is encountered during deserialization

Trait Implementations

impl Debug for Error

impl Display for Error

impl Error for Error

impl Error for Error

impl Error for Error

impl From<Error> for Error

impl From<Error> for Error

impl From<ParseIntError> for Error

impl From<Utf8Error> for Error

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

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

impl<T> AsFail for T where
    T: Fail, 

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

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

impl<E> Fail for E where
    E: 'static + Error + Send + Sync

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.