Enum ssb_legacy_msg_data::json::EncodeJsonError [−][src]
pub enum EncodeJsonError {
Io(Error),
InvalidFloat(f64),
InvalidUnsignedInteger(u64),
InvalidSignedInteger(i64),
UnknownLength,
Message(String),
}Expand description
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).
Can only serialize collections whose length is known upfront.
Message(String)Custom, stringly-typed error.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for EncodeJsonErrorimpl Send for EncodeJsonErrorimpl Sync for EncodeJsonErrorimpl Unpin for EncodeJsonErrorimpl !UnwindSafe for EncodeJsonError