pub struct FieldDecl {
pub name: Ident,
pub ty: TypeExpr,
pub default: Option<Expr>,
pub vis: Visibility,
pub span: Span,
}Expand description
A named field within a struct, class, or record declaration.
Fields carry a type annotation and an optional default-value expression.
Fields§
§name: IdentField name.
ty: TypeExprType annotation for the field.
default: Option<Expr>Optional default value expression.
vis: VisibilityVisibility qualifier.
span: SpanSource span of the field declaration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldDecl
impl RefUnwindSafe for FieldDecl
impl Send for FieldDecl
impl Sync for FieldDecl
impl Unpin for FieldDecl
impl UnsafeUnpin for FieldDecl
impl UnwindSafe for FieldDecl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more