Module casper_types::bytesrepr

source ·
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

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.
  • Deserializes a slice of 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.