Function lowertest_derive::get_field_name_type[][src]

pub(crate) fn get_field_name_type(
    f: &Field
) -> Option<(String, (String, &Type))>
Expand description

Gets the name and the type of a field of an enum variant or struct.

The result has three parts:

  1. The name of the field. If the field is unnamed, this is empty.
  2. The type of the field as a string.
  3. The type of the field as syn::Type.

Returns None if the field has the attribute #[mzreflect(ignore)].