Skip to main content

RegisterRef

Struct RegisterRef 

Source
pub struct RegisterRef<'a, 'vm> {
    pub vtype: ExprType,
    /* private fields */
}
Expand description

An immutable reference to a variable (register) in the register file, carrying its type for runtime validation of dereference operations.

Fields§

§vtype: ExprType

The type of the value pointed to.

Implementations§

Source§

impl<'a, 'vm> RegisterRef<'a, 'vm>

Source

pub fn deref_boolean(&self) -> bool

Dereferences this register reference as a boolean.

Source

pub fn deref_double(&self) -> f64

Dereferences this register reference as a double.

Source

pub fn deref_integer(&self) -> i32

Dereferences this register reference as an integer.

Source

pub fn deref_string(&self) -> &str

Dereferences this register reference as a string.

Source

pub fn array_dimensions(&self) -> &[usize]

Dereferences this register reference as an array and returns its dimensions.

Trait Implementations§

Source§

impl<'a, 'vm> Display for RegisterRef<'a, 'vm>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'vm> Freeze for RegisterRef<'a, 'vm>

§

impl<'a, 'vm> RefUnwindSafe for RegisterRef<'a, 'vm>

§

impl<'a, 'vm> Send for RegisterRef<'a, 'vm>

§

impl<'a, 'vm> Sync for RegisterRef<'a, 'vm>

§

impl<'a, 'vm> Unpin for RegisterRef<'a, 'vm>

§

impl<'a, 'vm> UnsafeUnpin for RegisterRef<'a, 'vm>

§

impl<'a, 'vm> UnwindSafe for RegisterRef<'a, 'vm>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.