pub struct FieldDecl {
pub name: Option<Symbol>,
pub ty: TypeId,
pub bits: Option<u32>,
pub align: Option<u64>,
pub packed: bool,
}Expand description
One member of a record as the program wrote it.
Fields§
§name: Option<Symbol>The member name, absent for an unnamed bit-field or an anonymous member.
ty: TypeIdThe member type. For an anonymous struct or union member this is that record.
bits: Option<u32>The bit-field width, absent when the member is an ordinary one.
Zero is allowed and means the zero width bit-field, which has to be unnamed and which exists only to push the next member to the next boundary.
align: Option<u64>An alignment the program asked for with _Alignas or aligned, in bytes.
It raises the member’s alignment and never lowers it, which is what both compilers do.
Lowering is what packed is for.
packed: boolWhether the member carries packed, which drops its alignment to one byte.
Implementations§
Trait Implementations§
impl Copy for FieldDecl
impl Eq for FieldDecl
impl StructuralPartialEq for FieldDecl
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