pub trait Shape:
Unbind
+ Ord
+ ShapeIdx<Idx<usize>: Ord + Eq + PartialOrd<Self>, IdxInc<usize>: Ord + Eq + PartialOrd<Self>> {
const IS_BOUND: bool = true;
Show 13 methods
// Provided methods
fn bind<'n>(self, guard: Guard<'n>) -> Dim<'n> { ... }
fn cast_idx_slice<I: Index>(slice: &[Idx<Self, I>]) -> &[I] { ... }
fn cast_idx_inc_slice<I: Index>(slice: &[IdxInc<Self, I>]) -> &[I] { ... }
fn start() -> IdxInc<Self> { ... }
fn next(idx: Idx<Self>) -> IdxInc<Self> { ... }
fn end(self) -> IdxInc<Self> { ... }
fn idx(self, idx: usize) -> Option<Idx<Self>> { ... }
fn idx_inc(self, idx: usize) -> Option<IdxInc<Self>> { ... }
fn checked_idx(self, idx: usize) -> Idx<Self> { ... }
fn checked_idx_inc(self, idx: usize) -> IdxInc<Self> { ... }
unsafe fn unchecked_idx(self, idx: usize) -> Idx<Self> { ... }
unsafe fn unchecked_idx_inc(self, idx: usize) -> IdxInc<Self> { ... }
fn indices(
from: IdxInc<Self>,
to: IdxInc<Self>,
) -> impl Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Self>> { ... }
}Expand description
matrix dimension
Provided Associated Constants§
Provided Methods§
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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 case
Sourcefn 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 case
Sourcefn checked_idx(self, idx: usize) -> Idx<Self>
fn checked_idx(self, idx: usize) -> Idx<Self>
checks if the index is valid, and panics otherwise
Sourcefn 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
Sourceunsafe fn unchecked_idx(self, idx: usize) -> Idx<Self>
unsafe fn unchecked_idx(self, idx: usize) -> Idx<Self>
Sourceunsafe fn unchecked_idx_inc(self, idx: usize) -> IdxInc<Self>
unsafe fn unchecked_idx_inc(self, idx: usize) -> IdxInc<Self>
Sourcefn 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 to
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".