pub struct Shape<'a> {
pub size: u64,
pub align: u64,
pub pieces: &'a [Piece],
pub complex: bool,
}Expand description
An aggregate, as much of it as an ABI cares about.
The pieces are every scalar in it, arrays and nested records flattened out, in offset order. Padding is not a piece: a hole is described by the offsets around it, which is what the classification rules are written over.
Fields§
§size: u64The size of the whole thing in bytes, padding included.
align: u64What it is aligned to, in bytes.
pieces: &'a [Piece]The scalars in it.
complex: boolWhether it is a _Complex rather than a struct or a union of the same shape.
One rule reads this and it is on SysV AMD64, where _Complex long double comes back on
the x87 stack and struct { long double a, b; }, which is the same thirty two bytes
with the same two members in the same places, comes back in memory.
Trait Implementations§
impl<'a> Copy for Shape<'a>
impl<'a> Eq for Shape<'a>
impl<'a> StructuralPartialEq for Shape<'a>
Auto Trait Implementations§
impl<'a> Freeze for Shape<'a>
impl<'a> RefUnwindSafe for Shape<'a>
impl<'a> Send for Shape<'a>
impl<'a> Sync for Shape<'a>
impl<'a> Unpin for Shape<'a>
impl<'a> UnsafeUnpin for Shape<'a>
impl<'a> UnwindSafe for Shape<'a>
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