pub struct LayoutShape {
pub fields: FieldsShape,
pub variants: VariantsShape,
pub abi: ValueAbi,
pub abi_align: Align,
pub size: MachineSize,
}
Expand description
The layout of a type in memory.
Fields§
§fields: FieldsShape
The fields location within the layout
variants: VariantsShape
Encodes information about multi-variant layouts.
Even with Multiple
variants, a layout still has its own fields! Those are then
shared between all variants.
To access all fields of this layout, both fields
and the fields of the active variant
must be taken into account.
abi: ValueAbi
The abi
defines how this data is passed between functions.
abi_align: Align
The ABI mandated alignment in bytes.
size: MachineSize
The size of this layout in bytes.
Implementations§
Trait Implementations§
Source§impl Clone for LayoutShape
impl Clone for LayoutShape
Source§fn clone(&self) -> LayoutShape
fn clone(&self) -> LayoutShape
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LayoutShape
impl Debug for LayoutShape
Source§impl Hash for LayoutShape
impl Hash for LayoutShape
Source§impl PartialEq for LayoutShape
impl PartialEq for LayoutShape
Source§impl Serialize for LayoutShape
impl Serialize for LayoutShape
impl Eq for LayoutShape
impl StructuralPartialEq for LayoutShape
Auto Trait Implementations§
impl Freeze for LayoutShape
impl RefUnwindSafe for LayoutShape
impl Send for LayoutShape
impl Sync for LayoutShape
impl Unpin for LayoutShape
impl UnwindSafe for LayoutShape
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 272 bytes