Enum syntax::ext::deriving::generic::SubstructureFields[src]

pub enum SubstructureFields<'a> {
    Struct(Vec<FieldInfo>),
    EnumMatching(uint, &'a Variant, Vec<FieldInfo>),
    EnumNonMatching(&'a [(uint, P<Variant>, Vec<(Span, Option<Ident>, Gc<Expr>)>)]),
    StaticStruct(&'a StructDef, StaticFields),
    StaticEnum(&'a EnumDef, Vec<(Ident, Span, StaticFields)>),
}

A summary of the possible sets of fields. See above for details and examples

Variants

Struct
EnumMatching

Matching variants of the enum: variant index, ast::Variant, fields: the field name is only non-None in the case of a struct variant.

EnumNonMatching

non-matching variants of the enum, [(variant index, ast::Variant, [field span, field ident, fields])] (i.e. all fields for self are in the first tuple, for other1 are in the second tuple, etc.)

StaticStruct

A static method where Self is a struct.

StaticEnum

A static method where Self is an enum.