Struct dusk_dire::hir::ModScopeId
source · [−]#[repr(transparent)]pub struct ModScopeId { /* private fields */ }
Implementations
sourceimpl ModScopeId
impl ModScopeId
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
sourceimpl Add<ModScopeId> for ModScopeId
impl Add<ModScopeId> for ModScopeId
type Output = ModScopeId
type Output = ModScopeId
The resulting type after applying the +
operator.
sourcefn add(self, other: ModScopeId) -> ModScopeId
fn add(self, other: ModScopeId) -> ModScopeId
Performs the +
operation. Read more
sourceimpl Add<ModScopeId> for usize
impl Add<ModScopeId> for usize
type Output = ModScopeId
type Output = ModScopeId
The resulting type after applying the +
operator.
sourcefn add(self, other: ModScopeId) -> ModScopeId
fn add(self, other: ModScopeId) -> ModScopeId
Performs the +
operation. Read more
sourceimpl Add<usize> for ModScopeId
impl Add<usize> for ModScopeId
sourceimpl AddAssign<ModScopeId> for ModScopeId
impl AddAssign<ModScopeId> for ModScopeId
sourcefn add_assign(&mut self, other: ModScopeId)
fn add_assign(&mut self, other: ModScopeId)
Performs the +=
operation. Read more
sourceimpl AddAssign<usize> for ModScopeId
impl AddAssign<usize> for ModScopeId
sourcefn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the +=
operation. Read more
sourceimpl Clone for ModScopeId
impl Clone for ModScopeId
sourcefn clone(&self) -> ModScopeId
fn clone(&self) -> ModScopeId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ModScopeId
impl Debug for ModScopeId
sourceimpl From<ModScopeId> for usize
impl From<ModScopeId> for usize
sourcefn from(v: ModScopeId) -> usize
fn from(v: ModScopeId) -> usize
Converts to this type from the input type.
sourceimpl From<usize> for ModScopeId
impl From<usize> for ModScopeId
sourceimpl Hash for ModScopeId
impl Hash for ModScopeId
sourceimpl Idx for ModScopeId
impl Idx for ModScopeId
sourceimpl Ord for ModScopeId
impl Ord for ModScopeId
sourcefn cmp(&self, other: &ModScopeId) -> Ordering
fn cmp(&self, other: &ModScopeId) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ModScopeId> for ModScopeId
impl PartialEq<ModScopeId> for ModScopeId
sourcefn eq(&self, other: &ModScopeId) -> bool
fn eq(&self, other: &ModScopeId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ModScopeId) -> bool
fn ne(&self, other: &ModScopeId) -> bool
This method tests for !=
.
sourceimpl PartialEq<ModScopeId> for usize
impl PartialEq<ModScopeId> for usize
sourceimpl PartialEq<usize> for ModScopeId
impl PartialEq<usize> for ModScopeId
sourceimpl PartialOrd<ModScopeId> for ModScopeId
impl PartialOrd<ModScopeId> for ModScopeId
sourcefn partial_cmp(&self, other: &ModScopeId) -> Option<Ordering>
fn partial_cmp(&self, other: &ModScopeId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<ModScopeId> for usize
impl PartialOrd<ModScopeId> for usize
sourcefn partial_cmp(&self, other: &ModScopeId) -> Option<Ordering>
fn partial_cmp(&self, other: &ModScopeId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<usize> for ModScopeId
impl PartialOrd<usize> for ModScopeId
sourcefn partial_cmp(&self, other: &usize) -> Option<Ordering>
fn partial_cmp(&self, other: &usize) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Rem<usize> for ModScopeId
impl Rem<usize> for ModScopeId
sourceimpl Sub<ModScopeId> for ModScopeId
impl Sub<ModScopeId> for ModScopeId
type Output = ModScopeId
type Output = ModScopeId
The resulting type after applying the -
operator.
sourcefn sub(self, other: ModScopeId) -> ModScopeId
fn sub(self, other: ModScopeId) -> ModScopeId
Performs the -
operation. Read more
sourceimpl Sub<ModScopeId> for usize
impl Sub<ModScopeId> for usize
type Output = ModScopeId
type Output = ModScopeId
The resulting type after applying the -
operator.
sourcefn sub(self, other: ModScopeId) -> ModScopeId
fn sub(self, other: ModScopeId) -> ModScopeId
Performs the -
operation. Read more
sourceimpl Sub<usize> for ModScopeId
impl Sub<usize> for ModScopeId
sourceimpl SubAssign<ModScopeId> for ModScopeId
impl SubAssign<ModScopeId> for ModScopeId
sourcefn sub_assign(&mut self, other: ModScopeId)
fn sub_assign(&mut self, other: ModScopeId)
Performs the -=
operation. Read more
sourceimpl SubAssign<usize> for ModScopeId
impl SubAssign<usize> for ModScopeId
sourcefn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
Performs the -=
operation. Read more
impl Copy for ModScopeId
impl Eq for ModScopeId
impl StructuralEq for ModScopeId
impl StructuralPartialEq for ModScopeId
Auto Trait Implementations
impl RefUnwindSafe for ModScopeId
impl Send for ModScopeId
impl Sync for ModScopeId
impl Unpin for ModScopeId
impl UnwindSafe for ModScopeId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more