Crate concordium_base_derive

Crate concordium_base_derive 

Source
Expand description

Derive macros for deriving serialization in the Concordium binary format. This crate is intended to be used together with the concordium_base crate and should not be imported directly.

Derive Macros§

CborDeserialize
Derive CborDeserialize on the type. See the module concordium_base::common::cbor.
CborSerialize
Derive CborSerialize on the type. See the module concordium_base::common::cbor.
Deserial
Derive the Deserial trait. At present this only applies to struct’s.
SerdeBase16IgnoreLengthSerialize
Like SerdeBase16Serialize, but assuming that the concordium_base::Serialize implementation puts the length of the data as 4 bytes in big endian. These 4 bytes are dropped when converting to hex since the JSON format is self-describing so the length is not needed.
SerdeBase16Serialize
Derive a serde::Serialize and serde::Deserialize implementations for the type. This differs from serde’s serialization macros. Here the value is first serialized according to its concordium_base::Serialize implementation and then hex encoded into a string.
Serial
Derive the Serial trait. At present this only applies to struct’s.
Serialize
Derive both Serial and Deserial traits. At present this only applies to struct’s.