#[derive(SerializeEnumPrefixed)]
{
// Attributes available to this derive:
#[serde]
}
Expand description
Implement the serde::Serialize and serde::Deserialize trait
This version of the macro generates string tags which are composed of the discriminant name prefixed with the enum name.
Antelope blockchains expect enums (variant types) to be encoded as a
tuple of (discriminant, value) which is not natively supported by serde,
so this macro fills in the gap and should be used instead of
#[derive(Serialize, Deserialize)] for enum types. By default the discriminant
is serialized as a snake_case string.
It exposes one attribute argument for fields which is serde(rename).