Trait ark_serialize::CanonicalDeserialize[][src]

pub trait CanonicalDeserialize: Sized {
    fn deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>;

    fn deserialize_uncompressed<R: Read>(
        reader: R
    ) -> Result<Self, SerializationError> { ... }
fn deserialize_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)),
}

If your code depends on algebra instead, the example works analogously when importing algebra::serialize::*.

Required methods

Reads Self from reader.

Provided methods

Reads Self from reader without compression.

Reads self from reader without compression, and without performing validity checks. Should be used only when the input is trusted.

Implementations on Foreign Types

Implementors