pub struct VariableId { /* private fields */ }Implementations§
Source§impl VariableId
impl VariableId
Sourcepub const MAX_INDEX: usize = 4_294_967_295usize
pub const MAX_INDEX: usize = 4_294_967_295usize
If Self::CHECKS_MAX_INDEX is true, we’ll assert if trying to
produce a value larger than this in any of the ctors that don’t
have unchecked in their name.
Sourcepub const CHECKS_MAX_INDEX: bool = true
pub const CHECKS_MAX_INDEX: bool = true
Does this index type assert if asked to construct an index larger than MAX_INDEX?
Sourcepub fn from_foreign<F: Idx>(value: F) -> Self
pub fn from_foreign<F: Idx>(value: F) -> Self
Construct this index type from one in a different domain
Sourcepub const fn from_usize_unchecked(value: usize) -> Self
pub const fn from_usize_unchecked(value: usize) -> Self
Construct from a usize without any checks.
Sourcepub const fn from_raw_unchecked(raw: u32) -> Self
pub const fn from_raw_unchecked(raw: u32) -> Self
Construct from the underlying type without any checks.
Sourcepub fn from_usize(value: usize) -> Self
pub fn from_usize(value: usize) -> Self
Construct this index type from a usize.
Sourcepub fn check_index(v: usize)
pub fn check_index(v: usize)
Asserts v <= Self::MAX_INDEX unless Self::CHECKS_MAX_INDEX is false.
Trait Implementations§
Source§impl Add<VariableId> for usize
impl Add<VariableId> for usize
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§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 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 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 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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VariableId
impl Debug for VariableId
Source§impl Display for VariableId
impl Display for VariableId
Source§impl From<VariableId> for u32
impl From<VariableId> for u32
Source§fn from(v: VariableId) -> u32
fn from(v: VariableId) -> u32
Converts to this type from the input type.
Source§impl From<VariableId> for usize
impl From<VariableId> for usize
Source§fn from(v: VariableId) -> usize
fn from(v: VariableId) -> usize
Converts to this type from the input type.
Source§impl From<u32> for VariableId
impl From<u32> for VariableId
Source§impl From<usize> for VariableId
impl From<usize> for VariableId
Source§impl Hash for VariableId
impl Hash for VariableId
Source§impl Idx for VariableId
impl Idx for VariableId
Source§impl Index<VariableId> for Ast
impl Index<VariableId> for Ast
Source§impl Index<VariableId> for Hir
impl Index<VariableId> for Hir
Source§impl Index<VariableId> for Mir
impl Index<VariableId> for Mir
Source§impl IndexMut<VariableId> for Ast
impl IndexMut<VariableId> for Ast
Source§impl IndexMut<VariableId> for Hir
impl IndexMut<VariableId> for Hir
Source§impl IndexMut<VariableId> for Mir
impl IndexMut<VariableId> for Mir
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 · 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<VariableId> for usize
impl PartialEq<VariableId> for usize
Source§impl PartialEq<usize> for VariableId
impl PartialEq<usize> for VariableId
Source§impl PartialEq for VariableId
impl PartialEq for VariableId
Source§impl PartialOrd<VariableId> for usize
impl PartialOrd<VariableId> for usize
Source§impl PartialOrd<usize> for VariableId
impl PartialOrd<usize> for VariableId
Source§impl PartialOrd for VariableId
impl PartialOrd for VariableId
Source§impl Rem<usize> for VariableId
impl Rem<usize> for VariableId
Source§impl Sub<VariableId> for usize
impl Sub<VariableId> for usize
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§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 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 moreSource§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 moreimpl Copy for VariableId
impl Eq for VariableId
impl StructuralPartialEq for VariableId
Auto Trait Implementations§
impl Freeze for VariableId
impl RefUnwindSafe for VariableId
impl Send for VariableId
impl Sync for VariableId
impl Unpin 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<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.