pub struct RecordSpec {
pub kind: RecordKind,
pub name: Option<Ident>,
pub fields: Option<Vec<FieldDecl>>,
pub asserts: Vec<StaticAssert>,
pub attrs: Attributes,
pub pack: Option<u32>,
pub range: SourceRange,
}Expand description
A struct or union specifier, as written.
One of these lives in TranslationUnit::records per specifier in the
source, and TypeKind::Record names it by RecordSpecId.
Fields§
§kind: RecordKindstruct or union.
name: Option<Ident>The tag, if one was written.
fields: Option<Vec<FieldDecl>>The member list; None for a reference such as struct S *p.
asserts: Vec<StaticAssert>The _Static_assert declarations written among the members (C11).
They are kept apart from the members because they declare nothing: a member list with one in it lays out exactly as it would without.
attrs: AttributesWhat __attribute__((packed)) and friends asked of the whole record.
pack: Option<u32>The member alignment #pragma pack(N) was asking for where the
specifier was written, if any.
range: SourceRangeWhere the specifier was written.
Trait Implementations§
Source§impl Clone for RecordSpec
impl Clone for RecordSpec
Source§impl Debug for RecordSpec
impl Debug for RecordSpec
Source§impl PartialEq for RecordSpec
impl PartialEq for RecordSpec
impl StructuralPartialEq for RecordSpec
Auto Trait Implementations§
impl Freeze for RecordSpec
impl RefUnwindSafe for RecordSpec
impl Send for RecordSpec
impl Sync for RecordSpec
impl Unpin for RecordSpec
impl UnsafeUnpin for RecordSpec
impl UnwindSafe for RecordSpec
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