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