pub struct Scalar {
pub kind: Kind,
pub size: u64,
pub align: u64,
}Expand description
One scalar, with the three facts a psABI reads about it.
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 and not the format’s.
align: u64What it is aligned to, in bytes.
One for a bit-field, which may start anywhere and is an integer wherever it starts. That distinction earns its keep on SysV, where an ordinary member away from its natural alignment sends the whole aggregate to memory and a bit-field straddling an eightbyte does not.
Implementations§
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