Enum syn_helpers::Structure
source · pub enum Structure<'a> {
Struct {
struct_name: &'a Ident,
struct_attrs: &'a Vec<Attribute>,
},
EnumVariant {
enum_name: &'a Ident,
enum_attrs: &'a Vec<Attribute>,
variant_name: &'a Ident,
variant_attrs: &'a Vec<Attribute>,
},
}Expand description
The data type the field is under
Variants§
Implementations§
source§impl<'a> Structure<'a>
impl<'a> Structure<'a>
sourcepub fn all_attributes(&'a self) -> impl Iterator<Item = &'a Attribute>
pub fn all_attributes(&'a self) -> impl Iterator<Item = &'a Attribute>
Returns attributes on the declaration of the fields AND if a enum on the enum item
sourcepub fn field_attributes(&'a self) -> impl Iterator<Item = &'a Attribute>
pub fn field_attributes(&'a self) -> impl Iterator<Item = &'a Attribute>
Returns attributes on the declaration of the fields