pub struct RecordOptions {
pub packed: bool,
pub align: Option<u64>,
pub pack: Option<u64>,
pub bit_fields: Option<BitFieldStyle>,
}Expand description
What the program asked for on the record itself.
Fields§
§packed: boolpacked on the record, which is the same as packed on each of its members.
align: Option<u64>An alignment asked for with _Alignas or aligned, in bytes, which raises and never
lowers.
pack: Option<u64>The #pragma pack in effect, in bytes, which caps every member’s alignment.
bit_fields: Option<BitFieldStyle>The bit-field rule ms_struct or gcc_struct asked for, where it is not the target’s.
None is the target’s own rule, which is what a record without either attribute gets. The
attributes choose per record, so one translation unit can hold a record laid out by each
rule, and that is what they are for: a mingw-w64 program that shares a structure with code
built by a compiler that does not use Microsoft’s rule writes gcc_struct on it, and a
program on x86-64 Linux that reads a structure a Windows program wrote writes ms_struct.