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§
- Cbor
Deserialize - Derive
CborDeserializeon the type. See the moduleconcordium_base::common::cbor. - Cbor
Serialize - Derive
CborSerializeon the type. See the moduleconcordium_base::common::cbor. - Deserial
- Derive the
Deserialtrait. At present this only applies tostruct’s. - Serde
Base16 Ignore Length Serialize - Like
SerdeBase16Serialize, but assuming that theconcordium_base::Serializeimplementation 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. - Serde
Base16 Serialize - Derive a
serde::Serializeandserde::Deserializeimplementations for the type. This differs fromserde’s serialization macros. Here the value is first serialized according to itsconcordium_base::Serializeimplementation and then hex encoded into a string. - Serial
- Derive the
Serialtrait. At present this only applies tostruct’s. - Serialize
- Derive both
SerialandDeserialtraits. At present this only applies tostruct’s.