pub struct ValueRegs<R: Clone + Copy + Debug + PartialEq + Eq + InvalidSentinel> { /* private fields */ }
Expand description

Location at which a Value is stored in register(s): the value is located in one or more registers, depending on its width. A value may be stored in more than one register if the machine has no registers wide enough otherwise: for example, on a 32-bit architecture, we may store I64 values in two registers, and I128 values in four.

By convention, the register parts are kept in machine-endian order here.

N.B.: we cap the capacity of this at four (when any 32-bit target is enabled) or two (otherwise), and we use special in-band sentinal Reg values (Reg::invalid()) to avoid the need to carry a separate length. This allows the struct to be Copy (no heap or drop overhead) and be only 16 or 8 bytes, which is important for compiler performance.

Implementations

Create an invalid Value-in-Reg.

Is this Value-to-Reg mapping valid?

Is this Value-to-Reg mapping invalid?

Return the single register used for this value, if any.

Return an iterator over the registers storing this value.

Create a Value-in-R location for a value stored in one register.

Create a Value-in-R location for a value stored in two registers.

Return the number of registers used.

Map individual registers via a map function.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.