#[repr(transparent)]pub struct IndexU16<const N: u16>(_);
Expand description
This struct implements Indexable
and allows all values in 0..N
Implementations
Trait Implementations
sourceimpl<'de, const N: u16> Deserialize<'de> for IndexU16<N>
impl<'de, const N: u16> Deserialize<'de> for IndexU16<N>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<const N: u16> Indexable for IndexU16<N>
impl<const N: u16> Indexable for IndexU16<N>
sourceconst SET_SIZE: usize
const SET_SIZE: usize
The number of bytes it will take to represent this type in a set. Read more
type Iter = Map<Range<u16>, fn(_: u16) -> Self>
type Iter = Map<Range<u16>, fn(_: u16) -> Self>
The type of Iterator that will be returned by Self::iter()
sourceimpl<const N: u16> Ord for IndexU16<N>
impl<const N: u16> Ord for IndexU16<N>
sourceimpl<const N: u16> PartialOrd<IndexU16<N>> for IndexU16<N>
impl<const N: u16> PartialOrd<IndexU16<N>> for IndexU16<N>
sourcefn partial_cmp(&self, other: &IndexU16<N>) -> Option<Ordering>
fn partial_cmp(&self, other: &IndexU16<N>) -> 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<const N: u16> ReverseIndexable for IndexU16<N>
impl<const N: u16> ReverseIndexable for IndexU16<N>
sourcefn from_index(u: usize) -> Self
fn from_index(u: usize) -> Self
Converts from a usize to Self
impl<const N: u16> Copy for IndexU16<N>
impl<const N: u16> Eq for IndexU16<N>
impl<const N: u16> StructuralEq for IndexU16<N>
impl<const N: u16> StructuralPartialEq for IndexU16<N>
Auto Trait Implementations
impl<const N: u16> RefUnwindSafe for IndexU16<N>
impl<const N: u16> Send for IndexU16<N>
impl<const N: u16> Sync for IndexU16<N>
impl<const N: u16> Unpin for IndexU16<N>
impl<const N: u16> UnwindSafe for IndexU16<N>
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more