Enum syn_helpers::Fields [−][src]
pub enum Fields<'a> {
Named {
on_structure: Structure<'a>,
fields: Vec<NamedField<'a>>,
},
Unnamed {
on_structure: Structure<'a>,
fields: Vec<UnnamedField<'a>>,
},
Unit {
on_structure: Structure<'a>,
},
}
Expand description
Represents the fields in a structure. This could be the fields on a struct or the fields in the variant of a enum
Variants
Named
...{ X: String }
Unnamed
...(String)
Unit
Fields
on_structure: Structure<'a>
No fields ...
Implementations
pub fn fields_iterator<'b>(
&'b mut self
) -> impl Iterator<Item = NamedOrUnnamedField<'b, 'a>> + ExactSizeIterator
pub fn fields_iterator<'b>(
&'b mut self
) -> impl Iterator<Item = NamedOrUnnamedField<'b, 'a>> + ExactSizeIterator
Get a (exact size) iterator