Struct dusk_dire::hir::GenericCtxId
source · [−]#[repr(transparent)]pub struct GenericCtxId { /* private fields */ }
Implementations
sourceimpl GenericCtxId
impl GenericCtxId
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<GenericCtxId> for GenericCtxId
impl Add<GenericCtxId> for GenericCtxId
type Output = GenericCtxId
type Output = GenericCtxId
The resulting type after applying the +
operator.
sourcefn add(self, other: GenericCtxId) -> GenericCtxId
fn add(self, other: GenericCtxId) -> GenericCtxId
Performs the +
operation. Read more
sourceimpl Add<GenericCtxId> for usize
impl Add<GenericCtxId> for usize
type Output = GenericCtxId
type Output = GenericCtxId
The resulting type after applying the +
operator.
sourcefn add(self, other: GenericCtxId) -> GenericCtxId
fn add(self, other: GenericCtxId) -> GenericCtxId
Performs the +
operation. Read more
sourceimpl Add<usize> for GenericCtxId
impl Add<usize> for GenericCtxId
sourceimpl AddAssign<GenericCtxId> for GenericCtxId
impl AddAssign<GenericCtxId> for GenericCtxId
sourcefn add_assign(&mut self, other: GenericCtxId)
fn add_assign(&mut self, other: GenericCtxId)
Performs the +=
operation. Read more
sourceimpl AddAssign<usize> for GenericCtxId
impl AddAssign<usize> for GenericCtxId
sourcefn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the +=
operation. Read more
sourceimpl Clone for GenericCtxId
impl Clone for GenericCtxId
sourcefn clone(&self) -> GenericCtxId
fn clone(&self) -> GenericCtxId
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 GenericCtxId
impl Debug for GenericCtxId
sourceimpl Default for GenericCtxId
impl Default for GenericCtxId
sourceimpl From<GenericCtxId> for usize
impl From<GenericCtxId> for usize
sourcefn from(v: GenericCtxId) -> usize
fn from(v: GenericCtxId) -> usize
Converts to this type from the input type.
sourceimpl From<usize> for GenericCtxId
impl From<usize> for GenericCtxId
sourceimpl Hash for GenericCtxId
impl Hash for GenericCtxId
sourceimpl Idx for GenericCtxId
impl Idx for GenericCtxId
sourceimpl Ord for GenericCtxId
impl Ord for GenericCtxId
sourcefn cmp(&self, other: &GenericCtxId) -> Ordering
fn cmp(&self, other: &GenericCtxId) -> 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<GenericCtxId> for GenericCtxId
impl PartialEq<GenericCtxId> for GenericCtxId
sourcefn eq(&self, other: &GenericCtxId) -> bool
fn eq(&self, other: &GenericCtxId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GenericCtxId) -> bool
fn ne(&self, other: &GenericCtxId) -> bool
This method tests for !=
.
sourceimpl PartialEq<GenericCtxId> for usize
impl PartialEq<GenericCtxId> for usize
sourceimpl PartialEq<usize> for GenericCtxId
impl PartialEq<usize> for GenericCtxId
sourceimpl PartialOrd<GenericCtxId> for GenericCtxId
impl PartialOrd<GenericCtxId> for GenericCtxId
sourcefn partial_cmp(&self, other: &GenericCtxId) -> Option<Ordering>
fn partial_cmp(&self, other: &GenericCtxId) -> 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<GenericCtxId> for usize
impl PartialOrd<GenericCtxId> for usize
sourcefn partial_cmp(&self, other: &GenericCtxId) -> Option<Ordering>
fn partial_cmp(&self, other: &GenericCtxId) -> 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 GenericCtxId
impl PartialOrd<usize> for GenericCtxId
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 GenericCtxId
impl Rem<usize> for GenericCtxId
sourceimpl Sub<GenericCtxId> for GenericCtxId
impl Sub<GenericCtxId> for GenericCtxId
type Output = GenericCtxId
type Output = GenericCtxId
The resulting type after applying the -
operator.
sourcefn sub(self, other: GenericCtxId) -> GenericCtxId
fn sub(self, other: GenericCtxId) -> GenericCtxId
Performs the -
operation. Read more
sourceimpl Sub<GenericCtxId> for usize
impl Sub<GenericCtxId> for usize
type Output = GenericCtxId
type Output = GenericCtxId
The resulting type after applying the -
operator.
sourcefn sub(self, other: GenericCtxId) -> GenericCtxId
fn sub(self, other: GenericCtxId) -> GenericCtxId
Performs the -
operation. Read more
sourceimpl Sub<usize> for GenericCtxId
impl Sub<usize> for GenericCtxId
sourceimpl SubAssign<GenericCtxId> for GenericCtxId
impl SubAssign<GenericCtxId> for GenericCtxId
sourcefn sub_assign(&mut self, other: GenericCtxId)
fn sub_assign(&mut self, other: GenericCtxId)
Performs the -=
operation. Read more
sourceimpl SubAssign<usize> for GenericCtxId
impl SubAssign<usize> for GenericCtxId
sourcefn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
Performs the -=
operation. Read more
impl Copy for GenericCtxId
impl Eq for GenericCtxId
impl StructuralEq for GenericCtxId
impl StructuralPartialEq for GenericCtxId
Auto Trait Implementations
impl RefUnwindSafe for GenericCtxId
impl Send for GenericCtxId
impl Sync for GenericCtxId
impl Unpin for GenericCtxId
impl UnwindSafe for GenericCtxId
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