[][src]Struct derive_builder_core::BuilderField

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

field_ident: &'a Ident

Name of the target field.

field_type: &'a Type

Type of the target field.

The corresonding builder field will be Option<field_type>.

setter_enabled: bool

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.

field_visibility: Visibility

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

attrs: &'a [Attribute]

Attributes which will be attached to this builder field.

bindings: Bindings

Bindings to libstd or libcore.

Trait Implementations

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

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

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

fn into_token_stream(self) -> TokenStream[src]

Convert self directly into a TokenStream object. Read more

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Spanned for T where
    T: ToTokens
[src]