pub struct TypeLayout {
pub size_bits: u64,
pub field_alignment_bits: u64,
pub pointer_alignment_bits: u64,
pub required_alignment_bits: u64,
}Expand description
The computed layout of a type.
Fields§
§size_bits: u64The size of the type in bits.
This is the value returned by sizeof and C and std::mem::size_of in Rust
(but in bits instead of bytes). This is a multiple of pointer_alignment_bits.
field_alignment_bits: u64The alignment of the type, in bits, when used as a field in a record.
This is usually the value returned by _Alignof in C, but there are some edge
cases in GCC where _Alignof returns a smaller value.
pointer_alignment_bits: u64The alignment, in bits, of valid pointers to this type.
This is the value returned by std::mem::align_of in Rust
(but in bits instead of bytes). size_bits is a multiple of this value.
required_alignment_bits: u64The required alignment of the type in bits.
This value is only used by MSVC targets. It is 8 on all other
targets. On MSVC targets, this value restricts the effects of #pragma pack except
in some cases involving bit-fields.
Trait Implementations§
Source§impl Clone for TypeLayout
impl Clone for TypeLayout
Source§fn clone(&self) -> TypeLayout
fn clone(&self) -> TypeLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypeLayout
impl Debug for TypeLayout
Source§impl Default for TypeLayout
impl Default for TypeLayout
Source§fn default() -> TypeLayout
fn default() -> TypeLayout
Source§impl Into<()> for TypeLayout
impl Into<()> for TypeLayout
Source§impl Layout for TypeLayout
impl Layout for TypeLayout
Source§type TypeLayout = TypeLayout
type TypeLayout = TypeLayout
Source§type FieldLayout = FieldLayout
type FieldLayout = FieldLayout
Source§type OpaqueLayout = TypeLayout
type OpaqueLayout = TypeLayout
Source§impl PartialEq for TypeLayout
impl PartialEq for TypeLayout
Source§fn eq(&self, other: &TypeLayout) -> bool
fn eq(&self, other: &TypeLayout) -> bool
self and other values to be equal, and is used by ==.