[][src]Struct darling_core::codegen::Field

pub struct Field<'a> {
    pub name_in_attr: String,
    pub ident: &'a Ident,
    pub ty: &'a Type,
    pub default_expression: Option<DefaultExpression<'a>>,
    pub with_path: Path,
    pub map: Option<&'a Path>,
    pub skip: bool,
    pub multiple: bool,
}

Properties needed to generate code for a field in all the contexts where one may appear.

Fields

name_in_attr: String

The name presented to the user of the library. This will appear in error messages and will be looked when parsing names.

ident: &'a Ident

The name presented to the author of the library. This will appear in the setters or temporary variables which contain the values.

ty: &'a Type

The type of the field in the input.

default_expression: Option<DefaultExpression<'a>>with_path: Pathmap: Option<&'a Path>skip: boolmultiple: bool

Methods

impl<'a> Field<'a>
[src]

pub fn as_declaration(&'a self) -> Declaration<'a>
[src]

pub fn as_match(&'a self) -> MatchArm<'a>
[src]

pub fn as_initializer(&'a self) -> Initializer<'a>
[src]

pub fn as_presence_check(&'a self) -> CheckMissing<'a>
[src]

Trait Implementations

impl<'a> UsesTypeParams for Field<'a>
[src]

fn uses_type_params_cloned(
    &self,
    options: &Options,
    type_set: &IdentSet
) -> IdentSet
[src]

Find all type params using uses_type_params, then clone the found values and return the set.

impl<'a> PartialEq<Field<'a>> for Field<'a>
[src]

impl<'a> Eq for Field<'a>
[src]

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

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

Performs copy-assignment from source. Read more

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

Auto Trait Implementations

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

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

Blanket Implementations

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

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

type Owned = T

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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