Module serialize

Source

Re-exports§

pub use crate::FromBytes;
pub use crate::ToBytes;
pub use crate::FromBytes;
pub use crate::ToBytes;
pub use error::*;

Modules§

error
io
Traits, helpers, and type definitions for core I/O functionality.

Structs§

EmptyFlags
Flags to be encoded into the serialization.
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Enums§

Compress
EdwardsFlags
Flags to be encoded into the serialization. The default flags (empty) should not change the binary representation.
SWFlags
Flags to be encoded into the serialization. The default flags (empty) should not change the binary representation.
Validate

Traits§

CanonicalDeserialize
Deserializer in little endian format. This trait can be derived if all fields of a struct implement CanonicalDeserialize and the derive feature is enabled.
CanonicalDeserializeWithFlags
Deserializer in little endian format allowing flags to be encoded.
CanonicalSerialize
Serializer in little endian format. This trait can be derived if all fields of a struct implement CanonicalSerialize and the derive feature is enabled.
CanonicalSerializeWithFlags
Serializer in little endian format allowing to encode flags.
DeserializeExt
A helper trait used to simplify value extraction.
Flags
Represents metadata to be appended to an object’s serialization. For example, when serializing elliptic curve points, one can use a Flag to represent whether the serialization is the point at infinity, or whether the y coordinate is positive or not. These bits will be appended to the end of the point’s serialization, or included in a new byte, depending on space available.
Read
The Read trait allows for reading bytes from a source.
Valid
Write
A trait for objects which are byte-oriented sinks.

Functions§

deserialize_vec_without_len
Deserialize a Vector’s elements without deserializing the Vector’s length If you want to deserialize the full Vector, use CanonicalDeserialize for Vec<T>
number_of_bits_and_bytes
Return the number of (byte-aligned) bits and bytes required to represent the given number of bits.
number_of_bits_to_number_of_bytes
Return the number of bytes required to represent the given number of bits.
serialize_vec_without_len
Serialize a Vector’s elements without serializing the Vector’s length If you want to serialize the full Vector, use CanonicalSerialize for Vec<T>
serialized_vec_size_without_len
Serialize a Vector’s element sizes without serializing the Vector’s length If you want to serialize the full Vector, use CanonicalSerialize for Vec<T>

Derive Macros§

CanonicalDeserialize
CanonicalSerialize