Struct blart::RestrictedNodeIndex
source · #[repr(transparent)]pub struct RestrictedNodeIndex<const LIMIT: u8>(u8);
Expand description
A restricted index only valid from 0 to LIMIT - 1.
Tuple Fields§
§0: u8
Implementations§
source§impl<const LIMIT: u8> RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> RestrictedNodeIndex<LIMIT>
sourcepub const EMPTY: Self = _
pub const EMPTY: Self = _
A placeholder index value that indicates that the index is not occupied
sourcepub fn is_not_empty(self) -> bool
pub fn is_not_empty(self) -> bool
Return true if the given index is not the empty sentinel value
Trait Implementations§
source§impl<const LIMIT: u8> Clone for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> Clone for RestrictedNodeIndex<LIMIT>
source§fn clone(&self) -> RestrictedNodeIndex<LIMIT>
fn clone(&self) -> RestrictedNodeIndex<LIMIT>
Returns a copy 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<const LIMIT: u8> Debug for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> Debug for RestrictedNodeIndex<LIMIT>
source§impl<const LIMIT: u8> From<RestrictedNodeIndex<LIMIT>> for u8
impl<const LIMIT: u8> From<RestrictedNodeIndex<LIMIT>> for u8
source§fn from(src: RestrictedNodeIndex<LIMIT>) -> Self
fn from(src: RestrictedNodeIndex<LIMIT>) -> Self
Converts to this type from the input type.
source§impl<const LIMIT: u8> From<RestrictedNodeIndex<LIMIT>> for usize
impl<const LIMIT: u8> From<RestrictedNodeIndex<LIMIT>> for usize
source§fn from(src: RestrictedNodeIndex<LIMIT>) -> Self
fn from(src: RestrictedNodeIndex<LIMIT>) -> Self
Converts to this type from the input type.
source§impl<const LIMIT: u8> PartialEq<RestrictedNodeIndex<LIMIT>> for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> PartialEq<RestrictedNodeIndex<LIMIT>> for RestrictedNodeIndex<LIMIT>
source§fn eq(&self, other: &RestrictedNodeIndex<LIMIT>) -> bool
fn eq(&self, other: &RestrictedNodeIndex<LIMIT>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<const LIMIT: u8> PartialOrd<RestrictedNodeIndex<LIMIT>> for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> PartialOrd<RestrictedNodeIndex<LIMIT>> for RestrictedNodeIndex<LIMIT>
1.0.0 · source§fn 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 moreimpl<const LIMIT: u8> Copy for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> Eq for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> StructuralEq for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> StructuralPartialEq for RestrictedNodeIndex<LIMIT>
Auto Trait Implementations§
impl<const LIMIT: u8> RefUnwindSafe for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> Send for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> Sync for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> Unpin for RestrictedNodeIndex<LIMIT>
impl<const LIMIT: u8> UnwindSafe for RestrictedNodeIndex<LIMIT>
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