All

Struct All 

Source
pub struct All<I: Index>(/* private fields */);
Expand description

The return type of Index::all().

Trait Implementations§

Source§

impl<I: Clone + Index> Clone for All<I>
where I::Size: Clone,

Source§

fn clone(&self) -> All<I>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<I: Debug + Index> Debug for All<I>
where I::Size: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I: Index> View for All<I>

Source§

type I = I

The index type.
Source§

type T = I

The element type.
Source§

fn size(&self) -> <Self::I as Index>::Size

The size of the array.
Source§

fn at(&self, index: Self::I) -> Self::T

Compute the element at index.
Source§

fn len(&self) -> usize

The number of elements in Self.
Source§

fn collect<A>(&self) -> A
where A: NewView<I = Self::I, T = Self::T>,

Materialises this View into a collection of type A, e.g. an Array. Read more
Source§

fn nested_collect<A>(self, size: <<Self::T as View>::I as Index>::Size) -> A
where Self::T: View, A: NewView<I = (Self::I, <Self::T as View>::I), T = <Self::T as View>::T>,

Materialises this nested View into a collection of type A, e.g. an Array. Read more
Source§

fn each(self, f: impl FnMut(Self::T))

Apply f to every element of this View in turn. Read more
Source§

fn enumerate(self) -> Enumerate<Self>

Creates a View with the same Index type as self such that at(i) returns (i, self.at(i)). Read more
Source§

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 more
Source§

fn map<U: Clone, F>(self, f: F) -> Map<Self, F>
where F: Fn(Self::T) -> U,

Creates a View that applies f to the elements of Self. Read more
Source§

fn compose<V: View<I = Self::T>>(self, other: V) -> Compose<Self, V>

Creates a View that uses self to select elements of other. Read more
Source§

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)>,

Concatenates self with other along an axis of type usize. Read more
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>,

Replace an axis Indexed by usize with one indexed by X. Read more
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>,

Replace an axis Indexed by X with one indexed by usize. Read more
Source§

fn insert_one<I: Index, J: Index, K: Index>( self, size: J::Size, ) -> InsertOne<Self, I, J, K>
where Self::I: Isomorphic<(I, K)>, <Self::I as Index>::Size: Isomorphic<(I::Size, K::Size)>,

Insert an axis of type J and length 1. Read more
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)>,

Remove an axis of type J and length 1. Read more
Source§

fn map_axis<I: Index, V: View, J: Index>( self, other: V, ) -> MapAxis<Self, I, V, J>
where V::T: Index, Self::I: Isomorphic<(I, V::T, J)>, <Self::I as Index>::Size: Isomorphic<(I::Size, <V::T as Index>::Size, J::Size)>,

Creates a view such that at((i, x, j)) gives self.at((i, other.at(x), j)). Read more
Source§

fn zip<V: View>(self, other: V) -> Zip<Self, V, Pair>
where Self::I: Broadcast<V::I>,

Creates a View that pairs of an element of self and an element of other. Read more
Source§

fn binary<V: View, B>(self, other: V) -> Zip<Self, V, B>
where Self::I: Broadcast<V::I>, B: Binary<Self::T, V::T>,

Creates a View that pairs of an element of self and an element of other, then applies binary operator B. Read more
Source§

fn coat<I>(self) -> Coat<Self, I>
where I: Coat<Self::I> + Index, Self::I: Coat<I>, I::Size: Coat<<Self::I as Index>::Size>, <Self::I as Index>::Size: Coat<I::Size>,

Wrap some of the Indexes of this View in Coated. Read more
Source§

fn iso<J>(self) -> Iso<Self, J>
where J: Isomorphic<Self::I> + Index, J::Size: Isomorphic<<Self::I as Index>::Size>,

Change the index type of this View to an Isomorphic type.
Source§

fn transpose<I: Index, X: Index, Y: Index, J: Index>( self, ) -> Transpose<Self, I, X, Y, J>
where (I, (Y, X), J): Isomorphic<Self::I>, (I::Size, (Y::Size, X::Size), J::Size): Isomorphic<<Self::I as Index>::Size>,

Reorder the indices of this View up to Isomorphic. Read more
Source§

fn row<I: Index, J: Index>(self, i: I) -> Row<Self, I, J>
where (I, J): Isomorphic<Self::I>, (I::Size, J::Size): Isomorphic<<Self::I as Index>::Size>,

Returns a View whose at(j) returns self.at(i, j). Read more
Source§

fn rows<I: Index, J: Index>(&self) -> Rows<&Self, I, J>
where (I, J): Isomorphic<Self::I>, (I::Size, J::Size): Isomorphic<<Self::I as Index>::Size>,

Returns a View whose at(i) returns self.row(i).
Source§

fn column<I: Index, J: Index>(self, j: J) -> Column<Self, I, J>
where (I, J): Isomorphic<Self::I>, (I::Size, J::Size): Isomorphic<<Self::I as Index>::Size>,

Returns a View whose at(i) returns self.at(i, j). Read more
Source§

fn columns<I: Index, J: Index>(&self) -> Columns<&Self, I, J>
where (I, J): Isomorphic<Self::I>, (I::Size, J::Size): Isomorphic<<Self::I as Index>::Size>,

Returns a View whose at(j) returns self.column(j).
Source§

impl<I: Copy + Index> Copy for All<I>
where I::Size: Copy,

Auto Trait Implementations§

§

impl<I> Freeze for All<I>
where <I as Index>::Size: Freeze,

§

impl<I> RefUnwindSafe for All<I>
where <I as Index>::Size: RefUnwindSafe,

§

impl<I> Send for All<I>
where <I as Index>::Size: Send,

§

impl<I> Sync for All<I>
where <I as Index>::Size: Sync,

§

impl<I> Unpin for All<I>
where <I as Index>::Size: Unpin,

§

impl<I> UnwindSafe for All<I>
where <I as Index>::Size: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<I> Coat<Coated<I>> for I

Source§

fn coat(self) -> Coated<I>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.