#[repr(transparent)]pub struct Coated<I>(pub I);Expand description
Coated<I> behaves like I in most respects, but implements NonTuple.
Tuple Fields§
§0: ITrait Implementations§
Source§impl<I: Index> Index for Coated<I>
impl<I: Index> Index for Coated<I>
Source§type Size = Coated<<I as Index>::Size>
type Size = Coated<<I as Index>::Size>
The run-time representation of the size of an
Array<Self, T>. Read moreSource§fn from_usize(size: Self::Size, index: usize) -> (usize, Self)
fn from_usize(size: Self::Size, index: usize) -> (usize, Self)
Returns
index / self.length(size) and the Self for which
to_usize() returns index % self.length(size).impl<I: Copy> Copy for Coated<I>
impl<I: Eq> Eq for Coated<I>
impl<I> NonTuple for Coated<I>
impl<I> StructuralPartialEq for Coated<I>
Auto Trait Implementations§
impl<I> Freeze for Coated<I>where
I: Freeze,
impl<I> RefUnwindSafe for Coated<I>where
I: RefUnwindSafe,
impl<I> Send for Coated<I>where
I: Send,
impl<I> Sync for Coated<I>where
I: Sync,
impl<I> Unpin for Coated<I>where
I: Unpin,
impl<I> UnwindSafe for Coated<I>where
I: UnwindSafe,
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<V, T> View for T
impl<V, T> View for T
Source§fn diagonal(self, zero: Self::T) -> Diagonal<Self>
fn diagonal(self, zero: Self::T) -> Diagonal<Self>
Returns a
View that maps (i, i) to t when Self maps i to t.
It maps (i, j) to zero if i != j. Read moreSource§fn concat<V: View<T = Self::T>, I: Index, J: Index>(
self,
other: V,
) -> Concat<Self, V, I, J>where
Self::I: Isomorphic<(I, usize, J)>,
<Self::I as Index>::Size: Isomorphic<(I::Size, usize, J::Size)>,
V::I: Isomorphic<(I, usize, J)>,
<V::I as Index>::Size: Isomorphic<(I::Size, usize, J::Size)>,
fn concat<V: View<T = Self::T>, I: Index, J: Index>(
self,
other: V,
) -> Concat<Self, V, I, J>where
Self::I: Isomorphic<(I, usize, J)>,
<Self::I as Index>::Size: Isomorphic<(I::Size, usize, J::Size)>,
V::I: Isomorphic<(I, usize, J)>,
<V::I as Index>::Size: Isomorphic<(I::Size, usize, J::Size)>,
Source§fn from_usize<I: Index, X: Index, J: Index>(
self,
from_length: impl FnOnce(usize) -> X::Size,
) -> FromUsize<Self, I, X, J>where
Self::I: Isomorphic<(I, usize, J)>,
<Self::I as Index>::Size: Isomorphic<<(I, usize, J) as Index>::Size>,
fn from_usize<I: Index, X: Index, J: Index>(
self,
from_length: impl FnOnce(usize) -> X::Size,
) -> FromUsize<Self, I, X, J>where
Self::I: Isomorphic<(I, usize, J)>,
<Self::I as Index>::Size: Isomorphic<<(I, usize, J) as Index>::Size>,
Source§fn to_usize<I: Index, X: Index, J: Index>(self) -> ToUsize<Self, I, X, J>where
Self::I: Isomorphic<(I, X, J)>,
<Self::I as Index>::Size: Isomorphic<<(I, X, J) as Index>::Size>,
fn to_usize<I: Index, X: Index, J: Index>(self) -> ToUsize<Self, I, X, J>where
Self::I: Isomorphic<(I, X, J)>,
<Self::I as Index>::Size: Isomorphic<<(I, X, J) as Index>::Size>,
Source§fn insert_one<I: Index, J: Index, K: Index>(
self,
size: J::Size,
) -> InsertOne<Self, I, J, K>
fn insert_one<I: Index, J: Index, K: Index>( self, size: J::Size, ) -> InsertOne<Self, I, J, K>
Source§fn remove_one<I: Index, J: Index, K: Index>(self) -> RemoveOne<Self, I, J, K>where
Self::I: Isomorphic<(I, J, K)>,
<Self::I as Index>::Size: Isomorphic<(I::Size, J::Size, K::Size)>,
fn remove_one<I: Index, J: Index, K: Index>(self) -> RemoveOne<Self, I, J, K>where
Self::I: Isomorphic<(I, J, K)>,
<Self::I as Index>::Size: Isomorphic<(I::Size, J::Size, K::Size)>,
Source§fn binary<V: View, B>(self, other: V) -> Zip<Self, V, B>
fn binary<V: View, B>(self, other: V) -> Zip<Self, V, B>
Creates a
View that pairs of an element of self and an element of
other, then applies binary operator B. Read moreSource§fn iso<J>(self) -> Iso<Self, J>
fn iso<J>(self) -> Iso<Self, J>
Change the index type of this
View to an Isomorphic type.Source§fn rows<I: Index, J: Index>(&self) -> Rows<&Self, I, J>
fn rows<I: Index, J: Index>(&self) -> Rows<&Self, I, J>
Returns a
View whose at(i) returns self.row(i).