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]

[src]

[src]

Trait Implementations

impl ToTokens for Field
[src]

[src]

Write self to the given TokenStream. Read more

[src]

Convert self directly into a TokenStream object. Read more

impl Debug for Field
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for Field
[src]

impl PartialEq for Field
[src]

[src]

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

[src]

This method tests for !=.

impl Hash for Field
[src]

[src]

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

1.3.0
[src]

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

impl Clone for Field
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more