Derive Macro concordium_std::Deserial [−][src]
#[derive(Deserial)] { // Attributes available to this derive: #[concordium] }
Derive the Deserial trait. See the documentation of derive(Serial)
for
details and limitations.
In addition to the attributes supported by derive(Serial)
, this derivation
macro supports the ensure_ordered
attribute. If applied to a field the
of type BTreeMap
or BTreeSet
deserialization will additionally ensure
that there keys are in strictly increasing order. By default deserialization
only ensures uniqueness.
Example
ⓘ
#[derive(Deserial)] struct Foo { #[concordium(set_size_length = 1, ensure_ordered)] bar: BTreeSet<u8>, }