[][src]Module casperlabs_types::bytesrepr

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

Enums

Error

Serialization and deserialization errors.

Constants

I32_SERIALIZED_LENGTH

The number of bytes in a serialized i32.

U8_SERIALIZED_LENGTH

The number of bytes in a serialized u8.

U16_SERIALIZED_LENGTH

The number of bytes in a serialized u16.

U32_SERIALIZED_LENGTH

The number of bytes in a serialized u32.

U64_SERIALIZED_LENGTH

The number of bytes in a serialized u64.

U128_SERIALIZED_LENGTH

The number of bytes in a serialized U128.

U256_SERIALIZED_LENGTH

The number of bytes in a serialized U256.

U512_SERIALIZED_LENGTH

The number of bytes in a serialized U512.

Traits

FromBytes

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

ToBytes

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

Functions

deserialize

Deserializes bytes into an instance of T.

serialize

Serializes t into a Vec<u8>.