pub struct DeferredConst(/* private fields */);Expand description
A deferred constant identifier.
Deferred constants are immediates whose final value is only known after bytecode emission has observed lazy backend state, such as exact spill slot allocation. They must be resolved before assembly.
Implementations§
Source§impl DeferredConst
impl DeferredConst
Sourcepub const CHECKS_MAX_INDEX: bool = true
pub const CHECKS_MAX_INDEX: bool = true
Whether this index type performs bounds checking.
Sourcepub const fn new(value: usize) -> DeferredConst
pub const fn new(value: usize) -> DeferredConst
Sourcepub const fn from_raw(value: NonMaxU32) -> DeferredConst
pub const fn from_raw(value: NonMaxU32) -> DeferredConst
Create an index from a raw NonMaxU32 value.
Sourcepub fn from_foreign<F>(value: F) -> DeferredConstwhere
F: Idx,
pub fn from_foreign<F>(value: F) -> DeferredConstwhere
F: Idx,
Convert an index from another index type.
Sourcepub const unsafe fn from_usize_unchecked(value: usize) -> DeferredConst
pub const unsafe fn from_usize_unchecked(value: usize) -> DeferredConst
Create an index from a usize without bounds checking.
§SAFETY
The caller must ensure value < (u32::MAX as usize).
Sourcepub const unsafe fn from_raw_unchecked(raw: u32) -> DeferredConst
pub const unsafe fn from_raw_unchecked(raw: u32) -> DeferredConst
Create an index from a raw u32 without bounds checking.
§SAFETY
The caller must ensure the value is not u32::MAX.
Sourcepub const fn from_usize(value: usize) -> DeferredConst
pub const fn from_usize(value: usize) -> DeferredConst
Source§impl DeferredConst
impl DeferredConst
Sourcepub const MAX: DeferredConst
pub const MAX: DeferredConst
The maximum index value.
Trait Implementations§
Source§impl Add for DeferredConst
impl Add for DeferredConst
Source§type Output = DeferredConst
type Output = DeferredConst
The resulting type after applying the
+ operator.Source§fn add(self, other: DeferredConst) -> DeferredConst
fn add(self, other: DeferredConst) -> DeferredConst
Performs the
+ operation. Read moreSource§impl Add<usize> for DeferredConst
impl Add<usize> for DeferredConst
Source§type Output = DeferredConst
type Output = DeferredConst
The resulting type after applying the
+ operator.Source§impl AddAssign for DeferredConst
impl AddAssign for DeferredConst
Source§fn add_assign(&mut self, other: DeferredConst)
fn add_assign(&mut self, other: DeferredConst)
Performs the
+= operation. Read moreSource§impl AddAssign<usize> for DeferredConst
impl AddAssign<usize> for DeferredConst
Source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the
+= operation. Read moreSource§impl Clone for DeferredConst
impl Clone for DeferredConst
Source§fn clone(&self) -> DeferredConst
fn clone(&self) -> DeferredConst
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeferredConst
Source§impl Debug for DeferredConst
impl Debug for DeferredConst
impl Eq for DeferredConst
Source§impl From<usize> for DeferredConst
impl From<usize> for DeferredConst
Source§fn from(value: usize) -> DeferredConst
fn from(value: usize) -> DeferredConst
Converts to this type from the input type.
Source§impl Hash for DeferredConst
impl Hash for DeferredConst
Source§impl Idx for DeferredConst
impl Idx for DeferredConst
Source§const MAX: usize = Self::MAX_INDEX
const MAX: usize = Self::MAX_INDEX
The maximum value that can be represented by this index type.
Source§unsafe fn from_usize_unchecked(idx: usize) -> DeferredConst
unsafe fn from_usize_unchecked(idx: usize) -> DeferredConst
Construct an index from a
usize without bounds checking. Read moreSource§fn from_usize(idx: usize) -> Self
fn from_usize(idx: usize) -> Self
Source§impl Ord for DeferredConst
impl Ord for DeferredConst
Source§fn cmp(&self, other: &DeferredConst) -> Ordering
fn cmp(&self, other: &DeferredConst) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DeferredConst
impl PartialEq for DeferredConst
Source§fn eq(&self, other: &DeferredConst) -> bool
fn eq(&self, other: &DeferredConst) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<usize> for DeferredConst
impl PartialEq<usize> for DeferredConst
Source§impl PartialOrd for DeferredConst
impl PartialOrd for DeferredConst
Source§impl PartialOrd<usize> for DeferredConst
impl PartialOrd<usize> for DeferredConst
Source§impl Rem<usize> for DeferredConst
impl Rem<usize> for DeferredConst
Source§type Output = DeferredConst
type Output = DeferredConst
The resulting type after applying the
% operator.impl StructuralPartialEq for DeferredConst
Source§impl Sub for DeferredConst
impl Sub for DeferredConst
Source§type Output = DeferredConst
type Output = DeferredConst
The resulting type after applying the
- operator.Source§fn sub(self, other: DeferredConst) -> DeferredConst
fn sub(self, other: DeferredConst) -> DeferredConst
Performs the
- operation. Read moreSource§impl Sub<usize> for DeferredConst
impl Sub<usize> for DeferredConst
Source§type Output = DeferredConst
type Output = DeferredConst
The resulting type after applying the
- operator.Source§impl SubAssign for DeferredConst
impl SubAssign for DeferredConst
Source§fn sub_assign(&mut self, other: DeferredConst)
fn sub_assign(&mut self, other: DeferredConst)
Performs the
-= operation. Read moreSource§impl SubAssign<usize> for DeferredConst
impl SubAssign<usize> for DeferredConst
Source§fn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
Performs the
-= operation. Read moreAuto Trait Implementations§
impl Freeze for DeferredConst
impl RefUnwindSafe for DeferredConst
impl Send for DeferredConst
impl Sync for DeferredConst
impl Unpin for DeferredConst
impl UnsafeUnpin for DeferredConst
impl UnwindSafe for DeferredConst
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<I, T> IdxSliceIndex<I, T> for Iwhere
I: Idx,
impl<I, T> IdxSliceIndex<I, T> for Iwhere
I: Idx,
type Output = T
fn get( self, slice: &IndexSlice<I, [T]>, ) -> Option<&<I as IdxSliceIndex<I, T>>::Output>
fn get_mut( self, slice: &mut IndexSlice<I, [T]>, ) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>
fn index( self, slice: &IndexSlice<I, [T]>, ) -> &<I as IdxSliceIndex<I, T>>::Output
fn index_mut( self, slice: &mut IndexSlice<I, [T]>, ) -> &mut <I as IdxSliceIndex<I, T>>::Output
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more