Struct derive_builder_core::BuilderField[][src]

pub struct BuilderField<'a> {
    pub field_ident: &'a Ident,
    pub field_type: &'a Type,
    pub setter_enabled: bool,
    pub field_visibility: Visibility,
    pub attrs: &'a [Attribute],
    pub bindings: Bindings,
}

Field for the builder struct, implementing quote::ToTokens.

Examples

Will expand to something like the following (depending on settings):

#[some_attr] pub foo: ::std::option::Option<String>,

Fields

Name of the target field.

Type of the target field.

The corresonding builder field will be Option<field_type>.

Whether the builder implements a setter for this field.

Note: We will fallback to PhantomData if the setter is disabled to hack around issues with unused generic type parameters - at least for now.

Visibility of this builder field, e.g. syn::Visibility::Public.

Attributes which will be attached to this builder field.

Bindings to libstd or libcore.

Trait Implementations

impl<'a> Debug for BuilderField<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Clone for BuilderField<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> ToTokens for BuilderField<'a>
[src]

Write self to the given Tokens. Read more

Convert self directly into a Tokens object. Read more

Auto Trait Implementations

impl<'a> !Send for BuilderField<'a>

impl<'a> !Sync for BuilderField<'a>