pub struct VariableId(/* private fields */);Expand description
A Variable ID.
Implementations§
Source§impl VariableId
impl VariableId
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) -> VariableId
pub const fn new(value: usize) -> VariableId
Sourcepub const fn from_raw(value: NonMaxU32) -> VariableId
pub const fn from_raw(value: NonMaxU32) -> VariableId
Create an index from a raw NonMaxU32 value.
Sourcepub fn from_foreign<F>(value: F) -> VariableIdwhere
F: Idx,
pub fn from_foreign<F>(value: F) -> VariableIdwhere
F: Idx,
Convert an index from another index type.
Sourcepub const unsafe fn from_usize_unchecked(value: usize) -> VariableId
pub const unsafe fn from_usize_unchecked(value: usize) -> VariableId
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) -> VariableId
pub const unsafe fn from_raw_unchecked(raw: u32) -> VariableId
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) -> VariableId
pub const fn from_usize(value: usize) -> VariableId
Source§impl VariableId
impl VariableId
Sourcepub const MAX: VariableId
pub const MAX: VariableId
The maximum index value.
Trait Implementations§
Source§impl Add for VariableId
impl Add for VariableId
Source§type Output = VariableId
type Output = VariableId
The resulting type after applying the
+ operator.Source§fn add(self, other: VariableId) -> VariableId
fn add(self, other: VariableId) -> VariableId
Performs the
+ operation. Read moreSource§impl Add<usize> for VariableId
impl Add<usize> for VariableId
Source§type Output = VariableId
type Output = VariableId
The resulting type after applying the
+ operator.Source§impl AddAssign for VariableId
impl AddAssign for VariableId
Source§fn add_assign(&mut self, other: VariableId)
fn add_assign(&mut self, other: VariableId)
Performs the
+= operation. Read moreSource§impl AddAssign<usize> for VariableId
impl AddAssign<usize> for VariableId
Source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the
+= operation. Read moreSource§impl Clone for VariableId
impl Clone for VariableId
Source§fn clone(&self) -> VariableId
fn clone(&self) -> VariableId
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 VariableId
Source§impl Debug for VariableId
impl Debug for VariableId
impl Eq for VariableId
Source§impl From<VariableId> for ItemId
impl From<VariableId> for ItemId
Source§fn from(value: VariableId) -> ItemId
fn from(value: VariableId) -> ItemId
Converts to this type from the input type.
Source§impl From<usize> for VariableId
impl From<usize> for VariableId
Source§fn from(value: usize) -> VariableId
fn from(value: usize) -> VariableId
Converts to this type from the input type.
Source§impl Hash for VariableId
impl Hash for VariableId
Source§impl Idx for VariableId
impl Idx for VariableId
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) -> VariableId
unsafe fn from_usize_unchecked(idx: usize) -> VariableId
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 VariableId
impl Ord for VariableId
Source§fn cmp(&self, other: &VariableId) -> Ordering
fn cmp(&self, other: &VariableId) -> 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 VariableId
impl PartialEq for VariableId
Source§fn eq(&self, other: &VariableId) -> bool
fn eq(&self, other: &VariableId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<usize> for VariableId
impl PartialEq<usize> for VariableId
Source§impl PartialOrd for VariableId
impl PartialOrd for VariableId
Source§impl PartialOrd<usize> for VariableId
impl PartialOrd<usize> for VariableId
Source§impl Rem<usize> for VariableId
impl Rem<usize> for VariableId
Source§type Output = VariableId
type Output = VariableId
The resulting type after applying the
% operator.impl StructuralPartialEq for VariableId
Source§impl Sub for VariableId
impl Sub for VariableId
Source§type Output = VariableId
type Output = VariableId
The resulting type after applying the
- operator.Source§fn sub(self, other: VariableId) -> VariableId
fn sub(self, other: VariableId) -> VariableId
Performs the
- operation. Read moreSource§impl Sub<usize> for VariableId
impl Sub<usize> for VariableId
Source§type Output = VariableId
type Output = VariableId
The resulting type after applying the
- operator.Source§impl SubAssign for VariableId
impl SubAssign for VariableId
Source§fn sub_assign(&mut self, other: VariableId)
fn sub_assign(&mut self, other: VariableId)
Performs the
-= operation. Read moreSource§impl SubAssign<usize> for VariableId
impl SubAssign<usize> for VariableId
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 VariableId
impl RefUnwindSafe for VariableId
impl Send for VariableId
impl Sync for VariableId
impl Unpin for VariableId
impl UnsafeUnpin for VariableId
impl UnwindSafe for VariableId
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