pub struct FieldDef {
pub name: String,
pub ty: TypeAnn,
pub span: Span,
}Expand description
One field in a struct, or one labelled value carried by an enum case, like
the x: int in struct Point { x: int } or the radius: float in
circle(radius: float). Same shape as a parameter, but it names data rather
than an argument, so it gets its own type for clarity.
Fields§
§name: String§ty: TypeAnn§span: SpanTrait Implementations§
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin for FieldDef
impl UnsafeUnpin for FieldDef
impl UnwindSafe for FieldDef
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