logo
Expand description

Contains serialization and deserialization code for types used throughout the system.

Structs

A newtype wrapper for bytes that has efficient serialization routines.

Enums

Serialization and deserialization errors.

Constants

The number of bytes in a serialized bool.

The number of bytes in a serialized i32.

The number of bytes in a serialized i64.

The tag representing a None value.

The tag representing a Some value.

The tag representing an Err value.

The tag representing an Ok value.

The number of bytes in a serialized u8.

The number of bytes in a serialized u16.

The number of bytes in a serialized u32.

The number of bytes in a serialized u64.

The number of bytes in a serialized U128.

The number of bytes in a serialized U256.

The number of bytes in a serialized U512.

The number of bytes in a serialized ().

Traits

A type which can be deserialized from a Vec<u8>.

A type which can be serialized to a Vec<u8>.

Functions

Returns a Vec<u8> initialized with sufficient capacity to hold to_be_serialized after serialization, or an error if the capacity would exceed u32::max_value().

Deserializes bytes into an instance of T.

Serializes t into a Vec<u8>.

Returns a Vec<u8> initialized with sufficient capacity to hold to_be_serialized after serialization.