pub struct ReferenceId { /* private fields */ }Implementations§
Source§impl ReferenceId
impl ReferenceId
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<ReferenceId> for usize
impl Add<ReferenceId> for usize
Source§type Output = ReferenceId
type Output = ReferenceId
The resulting type after applying the
+ operator.Source§fn add(self, other: ReferenceId) -> ReferenceId
fn add(self, other: ReferenceId) -> ReferenceId
Performs the
+ operation. Read moreSource§impl Add<usize> for ReferenceId
impl Add<usize> for ReferenceId
Source§impl Add for ReferenceId
impl Add for ReferenceId
Source§type Output = ReferenceId
type Output = ReferenceId
The resulting type after applying the
+ operator.Source§fn add(self, other: ReferenceId) -> ReferenceId
fn add(self, other: ReferenceId) -> ReferenceId
Performs the
+ operation. Read moreSource§impl AddAssign<usize> for ReferenceId
impl AddAssign<usize> for ReferenceId
Source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
Performs the
+= operation. Read moreSource§impl AddAssign for ReferenceId
impl AddAssign for ReferenceId
Source§fn add_assign(&mut self, other: ReferenceId)
fn add_assign(&mut self, other: ReferenceId)
Performs the
+= operation. Read moreSource§impl Clone for ReferenceId
impl Clone for ReferenceId
Source§fn clone(&self) -> ReferenceId
fn clone(&self) -> ReferenceId
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 ReferenceId
impl Debug for ReferenceId
Source§impl From<ReferenceId> for u32
impl From<ReferenceId> for u32
Source§fn from(v: ReferenceId) -> u32
fn from(v: ReferenceId) -> u32
Converts to this type from the input type.
Source§impl From<ReferenceId> for usize
impl From<ReferenceId> for usize
Source§fn from(v: ReferenceId) -> usize
fn from(v: ReferenceId) -> usize
Converts to this type from the input type.
Source§impl From<u32> for ReferenceId
impl From<u32> for ReferenceId
Source§impl From<usize> for ReferenceId
impl From<usize> for ReferenceId
Source§impl Hash for ReferenceId
impl Hash for ReferenceId
Source§impl Idx for ReferenceId
impl Idx for ReferenceId
Source§impl Ord for ReferenceId
impl Ord for ReferenceId
Source§fn cmp(&self, other: &ReferenceId) -> Ordering
fn cmp(&self, other: &ReferenceId) -> 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<ReferenceId> for usize
impl PartialEq<ReferenceId> for usize
Source§impl PartialEq<usize> for ReferenceId
impl PartialEq<usize> for ReferenceId
Source§impl PartialEq for ReferenceId
impl PartialEq for ReferenceId
Source§impl PartialOrd<ReferenceId> for usize
impl PartialOrd<ReferenceId> for usize
Source§impl PartialOrd<usize> for ReferenceId
impl PartialOrd<usize> for ReferenceId
Source§impl PartialOrd for ReferenceId
impl PartialOrd for ReferenceId
Source§impl Rem<usize> for ReferenceId
impl Rem<usize> for ReferenceId
Source§impl Sub<ReferenceId> for usize
impl Sub<ReferenceId> for usize
Source§type Output = ReferenceId
type Output = ReferenceId
The resulting type after applying the
- operator.Source§fn sub(self, other: ReferenceId) -> ReferenceId
fn sub(self, other: ReferenceId) -> ReferenceId
Performs the
- operation. Read moreSource§impl Sub<usize> for ReferenceId
impl Sub<usize> for ReferenceId
Source§impl Sub for ReferenceId
impl Sub for ReferenceId
Source§type Output = ReferenceId
type Output = ReferenceId
The resulting type after applying the
- operator.Source§fn sub(self, other: ReferenceId) -> ReferenceId
fn sub(self, other: ReferenceId) -> ReferenceId
Performs the
- operation. Read moreSource§impl SubAssign<usize> for ReferenceId
impl SubAssign<usize> for ReferenceId
Source§fn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
Performs the
-= operation. Read moreSource§impl SubAssign for ReferenceId
impl SubAssign for ReferenceId
Source§fn sub_assign(&mut self, other: ReferenceId)
fn sub_assign(&mut self, other: ReferenceId)
Performs the
-= operation. Read moreimpl Copy for ReferenceId
impl Eq for ReferenceId
impl StructuralPartialEq for ReferenceId
Auto Trait Implementations§
impl Freeze for ReferenceId
impl RefUnwindSafe for ReferenceId
impl Send for ReferenceId
impl Sync for ReferenceId
impl Unpin for ReferenceId
impl UnwindSafe for ReferenceId
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<I, T> IdxSliceIndex<I, T> for Iwhere
I: Idx,
impl<I, T> IdxSliceIndex<I, T> for Iwhere
I: Idx,
type Output = T
fn get( self, slice: &IndexSlice<I, [T]>, ) -> Option<&<I as IdxSliceIndex<I, T>>::Output>
fn get_mut( self, slice: &mut IndexSlice<I, [T]>, ) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>
fn index( self, slice: &IndexSlice<I, [T]>, ) -> &<I as IdxSliceIndex<I, T>>::Output
fn index_mut( self, slice: &mut IndexSlice<I, [T]>, ) -> &mut <I as IdxSliceIndex<I, T>>::Output
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more