FieldDef in rustc_ast::ast - Rust (original) (raw)

pub struct FieldDef {
    pub attrs: AttrVec,
    pub id: NodeId,
    pub span: Span,
    pub vis: Visibility,
    pub safety: Safety,
    pub ident: Option<Ident>,
    pub ty: P<Ty>,
    pub default: Option<AnonConst>,
    pub is_placeholder: bool,
}

Expand description

Field definition in a struct, variant or union.

E.g., bar: usize as in struct Foo { bar: usize }.

§

§

§

§

§

§

§

§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 104 bytes