pub struct Scalar {
pub kind: Kind,
pub size: u64,
pub align: u64,
}Expand description
One scalar, with the two facts about it a psABI reads.
Fields§
§kind: KindWhether it is an integer or a floating point value.
size: u64How many bytes it takes in memory, which is the target’s answer rather than the
format’s: an x87 long double is eighty bits of value in sixteen bytes of storage.
align: u64What it is aligned to, in bytes.
One for a bit-field, which is allowed to start anywhere and which is an integer wherever it starts. That matters because an ordinary member that is not aligned puts the whole aggregate in memory on SysV, and a bit-field that straddles an eightbyte does not.
Trait Implementations§
impl Copy for Scalar
impl Eq for Scalar
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnsafeUnpin for Scalar
impl UnwindSafe for Scalar
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