Trait lowertest::MzEnumReflect[][src]

pub trait MzEnumReflect {
    fn mz_enum_reflect(
    ) -> HashMap<&'static str, (Vec<&'static str>, Vec<&'static str>)>; }
Expand description

A trait for listing the variants of an enum and the fields of each variant.

The information listed about the fields help build a JSON string that can be correctly deserialized into the enum.

Required methods

Returns a mapping of the variants of an enum to its fields.

The first vector comprises the names of the variant’s fields. It is empty if the variant has no fields or if the variant’s fields are unnamed.

The second vector comprises the types of the variant’s fields. It is empty if the variant has no fields.

Implementors