[][src]Enum ssb_json_msg_data::json::EncodeJsonError

pub enum EncodeJsonError {
    Io(Error),
    InvalidFloat(f64),
    InvalidUnsignedInteger(u64),
    InvalidSignedInteger(i64),
    UnknownLength,
    Message(String),
}

Everything that can go wrong during json serialization.

Variants

Io(Error)

An IO error occured on the underlying writer.

When serializing directly into a Vec<u8> or String, this error never occurs.

InvalidFloat(f64)

Tried to serialize a number forbidden by the ssb data format (an inifinity, NaN or -0.0).

InvalidUnsignedInteger(u64)

Tried to serialize an unsigned integer larger than 2^53 (these are not guaranteed to be represented correctly in a 64 bit float).

InvalidSignedInteger(i64)

Tried to serialize an signed integer with absolute value larger than 2^53 (these are not guaranteed to be represented correctly in a 64 bit float).

UnknownLength

Can only serialize collections whose length is known upfront.

Message(String)

Custom, stringly-typed error.

Trait Implementations

impl Debug for EncodeJsonError[src]

impl Display for EncodeJsonError[src]

impl Error for EncodeJsonError[src]

impl Error for EncodeJsonError[src]

impl From<Error> for EncodeJsonError[src]

Auto Trait Implementations

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.