pub struct RecordInfo {
pub kind: RecordKind,
pub tag: Option<Symbol>,
pub layout: Option<Layout>,
pub fields: Vec<Field>,
pub transparent: bool,
}Expand description
What is known about one struct or union declaration.
Fields§
§kind: RecordKindWhether it is a struct or a union.
tag: Option<Symbol>The tag, absent for an anonymous one.
layout: Option<Layout>The layout, absent until the members have been seen and laid out.
This is also what says whether the type is complete. A record is incomplete from the point its tag is first mentioned until its closing brace, and code in between may declare pointers to it and nothing else.
fields: Vec<Field>The members, placed, and empty until the record is complete.
One entry per member the program wrote, in that order, so a caller that kept the declarations can index the two together.
transparent: boolWhether __attribute__((transparent_union)) was written on it and held up.
Only ever true of a union, and only of one whose first member is the size and the
alignment of the whole of it, which is what makes passing the union and passing that
member the same thing at a call. What it buys is two rules: a parameter of this type is
compatible with a parameter of any member’s type, and a value assigned to it is put into
whichever member it fits. Both are in spec/13-gnu-compat.md.
Trait Implementations§
Source§impl Clone for RecordInfo
impl Clone for RecordInfo
Source§fn clone(&self) -> RecordInfo
fn clone(&self) -> RecordInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more