pub struct One;Expand description
dimension equal to one
Trait Implementations§
Source§impl Ord for One
impl Ord for One
Source§impl PartialOrd<One> for IdxIncOne
impl PartialOrd<One> for IdxIncOne
Source§impl PartialOrd<One> for Zero
impl PartialOrd<One> for Zero
Source§impl PartialOrd for One
impl PartialOrd for One
Source§impl Shape for One
impl Shape for One
Source§fn bind<'n>(self, guard: Guard<'n>) -> Dim<'n>
fn bind<'n>(self, guard: Guard<'n>) -> Dim<'n>
bind the current value using a invariant lifetime guard
Source§fn cast_idx_slice<I: Index>(slice: &[Idx<Self, I>]) -> &[I]
fn cast_idx_slice<I: Index>(slice: &[Idx<Self, I>]) -> &[I]
cast a slice of bound values to unbound values
Source§fn cast_idx_inc_slice<I: Index>(slice: &[IdxInc<Self, I>]) -> &[I]
fn cast_idx_inc_slice<I: Index>(slice: &[IdxInc<Self, I>]) -> &[I]
cast a slice of bound values to unbound values
Source§fn idx(self, idx: usize) -> Option<Idx<Self>>
fn idx(self, idx: usize) -> Option<Idx<Self>>
checks if the index is valid, returning
Some(_) in that caseSource§fn idx_inc(self, idx: usize) -> Option<IdxInc<Self>>
fn idx_inc(self, idx: usize) -> Option<IdxInc<Self>>
checks if the index is valid, returning
Some(_) in that caseSource§fn checked_idx(self, idx: usize) -> Idx<Self>
fn checked_idx(self, idx: usize) -> Idx<Self>
checks if the index is valid, and panics otherwise
Source§fn checked_idx_inc(self, idx: usize) -> IdxInc<Self>
fn checked_idx_inc(self, idx: usize) -> IdxInc<Self>
checks if the index is valid, and panics otherwise
Source§unsafe fn unchecked_idx_inc(self, idx: usize) -> IdxInc<Self>
unsafe fn unchecked_idx_inc(self, idx: usize) -> IdxInc<Self>
assumes the index is valid Read more
Source§fn indices(
from: IdxInc<Self>,
to: IdxInc<Self>,
) -> impl Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Self>>
fn indices( from: IdxInc<Self>, to: IdxInc<Self>, ) -> impl Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Self>>
returns an iterator over the indices between
from and toimpl Copy for One
impl Eq for One
impl StructuralPartialEq for One
Auto Trait Implementations§
impl Freeze for One
impl RefUnwindSafe for One
impl Send for One
impl Sync for One
impl Unpin for One
impl UnwindSafe for One
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<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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