pub trait CanonicalDeserialize: Valid {
    fn deserialize_with_mode<R: Read>(
        reader: R,
        compress: Compress,
        validate: Validate
    ) -> Result<Self, SerializationError>; fn deserialize_compressed<R: Read>(
        reader: R
    ) -> Result<Self, SerializationError> { ... } fn deserialize_compressed_unchecked<R: Read>(
        reader: R
    ) -> Result<Self, SerializationError> { ... } fn deserialize_uncompressed<R: Read>(
        reader: R
    ) -> Result<Self, SerializationError> { ... } fn deserialize_uncompressed_unchecked<R: Read>(
        reader: R
    ) -> Result<Self, SerializationError> { ... } }
Expand description

Deserializer in little endian format. This trait can be derived if all fields of a struct implement CanonicalDeserialize and the derive feature is enabled.

Example

// The `derive` feature must be set for the derivation to work.
use ark_serialize::*;

#[derive(CanonicalDeserialize)]
struct TestStruct {
    a: u64,
    b: (u64, (u64, u64)),
}

Required Methods§

The general deserialize method that takes in customization flags.

Provided Methods§

Implementations on Foreign Types§

Deserializes a BTreeMap from len(map) || key 1 || value 1 || ... || key n || value n.

Deserializes a BTreeSet from len(map) || value 1 || ... || value n.

Implementors§