[−][src]Enum rustc_mir::interpret::Scalar
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 8 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)The raw bytes of a simple value.
Ptr(Pointer<Tag>)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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.