pub struct ModuleId { /* private fields */ }Implementations§
Source§impl ModuleId
impl ModuleId
Sourcepub const MAX_INDEX: usize = 65_535usize
pub const MAX_INDEX: usize = 65_535usize
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: u16) -> Self
pub const fn from_raw_unchecked(raw: u16) -> 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 AddAssign<usize> for ModuleId
impl AddAssign<usize> for ModuleId
Source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the
+= operation. Read moreSource§impl AddAssign for ModuleId
impl AddAssign for ModuleId
Source§fn add_assign(&mut self, other: ModuleId)
fn add_assign(&mut self, other: ModuleId)
Performs the
+= operation. Read moreSource§impl Ord for ModuleId
impl Ord for ModuleId
Source§impl PartialOrd<ModuleId> for usize
impl PartialOrd<ModuleId> for usize
Source§impl PartialOrd<usize> for ModuleId
impl PartialOrd<usize> for ModuleId
Source§impl PartialOrd for ModuleId
impl PartialOrd for ModuleId
Source§impl SubAssign<usize> for ModuleId
impl SubAssign<usize> for ModuleId
Source§fn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
Performs the
-= operation. Read moreSource§impl SubAssign for ModuleId
impl SubAssign for ModuleId
Source§fn sub_assign(&mut self, other: ModuleId)
fn sub_assign(&mut self, other: ModuleId)
Performs the
-= operation. Read moreimpl Copy for ModuleId
impl Eq for ModuleId
impl StructuralPartialEq for ModuleId
Auto Trait Implementations§
impl Freeze for ModuleId
impl RefUnwindSafe for ModuleId
impl Send for ModuleId
impl Sync for ModuleId
impl Unpin for ModuleId
impl UnwindSafe for ModuleId
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.