Scalar represents an immediate, primitive value existing outside of a
memory::Allocation. It is in many ways like a small chunk of an
Allocation, up to 16 bytes in
size. Like a range of bytes in an
Scalar can either represent the raw bytes
of a simple value or a pointer into another
These variants would be private if there was a convenient way to achieve that in Rust.
Do not match on a
Scalar! Use the various
to_* methods instead.
The raw bytes of a simple value.
We also store the size of the pointer, such that a
Scalar always knows how big it is.
The size is always the pointer size of the current target, but this is not information
that we always have readily available.
Auto Trait Implementations§
impl<Prov> RefUnwindSafe for Scalar<Prov>where
impl<Prov> UnwindSafe for Scalar<Prov>where
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.