pub struct Field {
pub name: String,
pub anonymous: bool,
pub ty: Ty,
pub is_const: bool,
pub offset: u64,
pub bits: Option<BitField>,
pub flexible: bool,
pub range: SourceRange,
}Expand description
One member of a struct or union.
Fields§
§name: StringThe member name as written in C, or the synthetic __cinrs_anonN an
anonymous member is generated under.
anonymous: boolWhether this is an anonymous struct/union member (C11 6.7.2.1p13),
whose own members are reached through it as if they were the enclosing
record’s.
ty: TyThe member type.
is_const: boolWhether the member’s type is const-qualified.
offset: u64The byte offset from the start of the record (always 0 in a union).
For a bit-field this is the byte the field’s first bit falls in; the
exact position is in Field::bits.
bits: Option<BitField>Set when the member was declared with a width.
flexible: boolWhether this is the flexible array member int data[]; — an array of
no elements that the object is expected to be over-allocated for.
range: SourceRangeWhere the member was declared.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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