Row

Struct Row 

Source
pub struct Row<'a, T, I>
where I: Coordinate,
{ /* private fields */ }
Expand description

Row is a quality-of-life assistant to ease processing matrices in a row-major fashion.

Implementations§

Source§

impl<'a, T, I> Row<'a, T, I>
where I: Coordinate,

Source

pub fn row(&self) -> I

row returns the row number this Row represents, 0-based.

Source

pub fn iter(&self) -> MatrixRowIterator<'a, T, I>

iter returns a bi-directional iterator over row.

Source

pub fn get(&self, column: I) -> Option<&'a T>

get retrieves a specified column’s cell entry from this row.

Auto Trait Implementations§

§

impl<'a, T, I> Freeze for Row<'a, T, I>
where I: Freeze,

§

impl<'a, T, I> RefUnwindSafe for Row<'a, T, I>

§

impl<'a, T, I> Send for Row<'a, T, I>
where I: Send + Sync, T: Sync,

§

impl<'a, T, I> Sync for Row<'a, T, I>
where I: Sync, T: Sync,

§

impl<'a, T, I> Unpin for Row<'a, T, I>
where I: Unpin,

§

impl<'a, T, I> UnwindSafe for Row<'a, T, I>

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