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.

Fields

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.

Methods

impl Field
[src]

Trait Implementations

impl ToTokens for Field
[src]

Write self to the given TokenStream. Read more

Convert self directly into a TokenStream object. Read more

impl Debug for Field
[src]

Formats the value using the given formatter. Read more

impl Eq for Field
[src]

impl PartialEq for Field
[src]

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
[src]

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
[src]

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