Expand description
Helpers for data (de-)serialization.
Re-exports§
Structs§
- Empty
Flags - Flags to be encoded into the serialization.
Enums§
- Compress
- Edwards
Flags - 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.
- Serialization
Error - Validate
Traits§
- Canonical
Deserialize - Deserializer in little endian format.
This trait can be derived if all fields of a struct implement
CanonicalDeserializeand thederivefeature is enabled. - Canonical
Deserialize With Flags - Deserializer in little endian format allowing flags to be encoded.
- Canonical
Serialize - Serializer in little endian format.
This trait can be derived if all fields of a struct implement
CanonicalSerializeand thederivefeature is enabled. - Canonical
Serialize With Flags - Serializer in little endian format allowing to encode flags.
- Deserialize
Ext - 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
Flagto represent whether the serialization is the point at infinity, or whether theycoordinate 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
Readtrait 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>