Row

Struct Row 

Source
pub struct Row<V, I, J>(/* private fields */);
Expand description

The return type of View::row().

Trait Implementations§

Source§

impl<RHS: View, V, I, J> Add<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Add<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Add>

The resulting type after applying the + operator.
Source§

fn add(self, other: RHS) -> Self::Output

Performs the + operation. Read more
Source§

impl<RHS: View, V, I, J> BitAnd<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: BitAnd<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, BitAnd>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: RHS) -> Self::Output

Performs the & operation. Read more
Source§

impl<RHS: View, V, I, J> BitOr<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: BitOr<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, BitOr>

The resulting type after applying the | operator.
Source§

fn bitor(self, other: RHS) -> Self::Output

Performs the | operation. Read more
Source§

impl<RHS: View, V, I, J> BitXor<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: BitXor<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, BitXor>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: RHS) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<V: Clone, I: Clone, J: Clone> Clone for Row<V, I, J>

Source§

fn clone(&self) -> Row<V, I, J>

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<V: Debug, I: Debug, J: Debug> Debug for Row<V, I, J>

Source§

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

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

impl<RHS: View, V, I, J> Div<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Div<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Div>

The resulting type after applying the / operator.
Source§

fn div(self, other: RHS) -> Self::Output

Performs the / operation. Read more
Source§

impl<V: View, I: Index, J: Index> Index<<Row<V, I, J> as View>::I> for Row<V, I, J>
where Self: ViewRef,

Source§

type Output = <Row<V, I, J> as View>::T

The returned type after indexing.
Source§

fn index(&self, index: <Self as View>::I) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<V: View, I: Index, J: Index> IndexMut<<Row<V, I, J> as View>::I> for Row<V, I, J>
where Self: ViewMut,

Source§

fn index_mut(&mut self, index: <Self as View>::I) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<RHS: View, V, I, J> Mul<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Mul<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Mul>

The resulting type after applying the * operator.
Source§

fn mul(self, other: RHS) -> Self::Output

Performs the * operation. Read more
Source§

impl<RHS: View, V, I, J> Rem<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Rem<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Rem>

The resulting type after applying the % operator.
Source§

fn rem(self, other: RHS) -> Self::Output

Performs the % operation. Read more
Source§

impl<RHS: View, V, I, J> Shl<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Shl<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Shl>

The resulting type after applying the << operator.
Source§

fn shl(self, other: RHS) -> Self::Output

Performs the << operation. Read more
Source§

impl<RHS: View, V, I, J> Shr<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Shr<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Shr>

The resulting type after applying the >> operator.
Source§

fn shr(self, other: RHS) -> Self::Output

Performs the >> operation. Read more
Source§

impl<RHS: View, V, I, J> Sub<RHS> for Row<V, I, J>
where Self: View, <Self as View>::I: Broadcast<RHS::I>, <Self as View>::T: Sub<RHS::T>,

Source§

type Output = Zip<Row<V, I, J>, RHS, Sub>

The resulting type after applying the - operator.
Source§

fn sub(self, other: RHS) -> Self::Output

Performs the - operation. Read more
Source§

impl<V: View, I: Index, J: Index> View for Row<V, I, J>
where (I, J): Isomorphic<V::I>, (I::Size, J::Size): Isomorphic<<V::I as Index>::Size>,

Source§

type I = J

The index type.
Source§

type T = <V as View>::T

The element type.
Source§

fn size(&self) -> J::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(self) -> Nested<Self>
where Self: ViewRef, Self::T: View, <<Self::T as View>::I as Index>::Size: Isomorphic<()>,

Creates a View that represents this nested View. 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<V, I: Index, J: Index> ViewMut for Row<V, I, J>
where V: ViewMut + View, (I, J): Isomorphic<V::I>, (I::Size, J::Size): Isomorphic<<V::I as Index>::Size>,

Source§

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

Mutably borrow the element at index.
Source§

impl<V, I: Index, J: Index> ViewRef for Row<V, I, J>
where V: ViewRef + View, (I, J): Isomorphic<V::I>, (I::Size, J::Size): Isomorphic<<V::I as Index>::Size>,

Source§

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

Borrow the element at index.
Source§

impl<V: Copy, I: Copy, J: Copy> Copy for Row<V, I, J>

Auto Trait Implementations§

§

impl<V, I, J> Freeze for Row<V, I, J>
where V: Freeze, I: Freeze,

§

impl<V, I, J> RefUnwindSafe for Row<V, I, J>

§

impl<V, I, J> Send for Row<V, I, J>
where V: Send, I: Send, J: Send,

§

impl<V, I, J> Sync for Row<V, I, J>
where V: Sync, I: Sync, J: Sync,

§

impl<V, I, J> Unpin for Row<V, I, J>
where V: Unpin, I: Unpin, J: Unpin,

§

impl<V, I, J> UnwindSafe for Row<V, I, J>
where V: UnwindSafe, I: UnwindSafe, J: 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.