Struct syn::Field[][src]

pub struct Field {
    pub attrs: Vec<Attribute>,
    pub vis: Visibility,
    pub ident: Option<Ident>,
    pub colon_token: Option<Colon>,
    pub ty: Type,

A field of a struct or enum variant.

This type is available if Syn is built with the "derive" or "full" feature.


Attributes tagged on the field.

Visibility of the field.

Name of the field, if any.

Fields of tuple structs have no names.

Type of the field.


impl Field

Trait Implementations

impl ToTokens for Field

Write self to the given TokenStream. Read more

Convert self directly into a TokenStream object. Read more

impl Debug for Field

Formats the value using the given formatter. Read more

impl Eq for Field

impl PartialEq for Field

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for Field

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for Field

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for Field

impl !Sync for Field