Enum rustc_mir::interpret::Scalar [−][src]
Expand description
A Scalar represents an immediate, primitive value existing outside of a
memory::Allocation. It is in many ways like a small chunk of a Allocation, up to 16 bytes in
size. Like a range of bytes in an Allocation, a Scalar can either represent the raw bytes
of a simple value or a pointer into another Allocation
Variants
Int(ScalarInt)Expand description
The raw bytes of a simple value.
Ptr(Pointer<Tag>)Expand description
A pointer into an Allocation. An Allocation in the memory module has a list of
relocations, but a Scalar is only large enough to contain one, so we just represent the
relocation and its associated offset together as a Pointer here.
Trait Implementations
Auto Trait Implementations
impl<Tag> RefUnwindSafe for Scalar<Tag> where
Tag: RefUnwindSafe,
Tag: RefUnwindSafe,
impl<Tag> Send for Scalar<Tag> where
Tag: Send,
Tag: Send,
impl<Tag> Sync for Scalar<Tag> where
Tag: Sync,
Tag: Sync,
impl<Tag> Unpin for Scalar<Tag> where
Tag: Unpin,
Tag: Unpin,
impl<Tag> UnwindSafe for Scalar<Tag> where
Tag: UnwindSafe,
Tag: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]