Struct Rows

Source
#[repr(transparent)]
pub struct Rows(pub isize);
Expand description

A rows component of a Vector

Tuple Fields§

§0: isize

Trait Implementations§

Source§

impl Add<Columns> for Rows

Adding a Rows to a Columns produces a Vector

Source§

type Output = Vector

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Columns) -> Vector

Performs the + operation. Read more
Source§

impl Add<Rows> for Columns

Adding a Rows to a Columns produces a Vector

Source§

type Output = Vector

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Rows) -> Vector

Performs the + operation. Read more
Source§

impl Add<Rows> for Row

Source§

type Output = Row

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Rows) -> Self

Performs the + operation. Read more
Source§

impl<T: Into<Rows>> Add<T> for Rows

Source§

type Output = Rows

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self

Performs the + operation. Read more
Source§

impl AddAssign<Rows> for Row

Source§

fn add_assign(&mut self, rhs: Rows)

Performs the += operation. Read more
Source§

impl<T: Into<Rows>> AddAssign<T> for Rows

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl Clone for Rows

Source§

fn clone(&self) -> Rows

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 Component for Rows

Source§

type Converse = Columns

The converse component (Rows to Columns or vice versa)
Source§

type Point = Row

The assoicated location component type (Row or Column)
Source§

fn from_vector(vector: impl VectorLike) -> Self

Get this compnent from a Vector Read more
Source§

fn combine(self, other: Columns) -> Vector

Create a vector from a Row and Column Read more
Source§

fn value(self) -> isize

Get the integer value of this component. Read more
Source§

fn transpose(self) -> Self::Converse

Source§

impl Debug for Rows

Source§

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

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

impl Default for Rows

Source§

fn default() -> Rows

Returns the “default value” for a type. Read more
Source§

impl From<isize> for Rows

Source§

fn from(value: isize) -> Self

Converts to this type from the input type.
Source§

impl Hash for Rows

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> Mul<T> for Rows
where isize: Mul<T, Output = isize>,

Source§

type Output = Rows

The resulting type after applying the * operator.
Source§

fn mul(self, factor: T) -> Self

Performs the * operation. Read more
Source§

impl<T> MulAssign<T> for Rows
where isize: MulAssign<T>,

Source§

fn mul_assign(&mut self, factor: T)

Performs the *= operation. Read more
Source§

impl Neg for Rows

Source§

type Output = Rows

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl Ord for Rows

Source§

fn cmp(&self, other: &Rows) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<isize> for Rows

Source§

fn eq(&self, rhs: &isize) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Rows

Source§

fn eq(&self, other: &Rows) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<isize> for Rows

Source§

fn partial_cmp(&self, rhs: &isize) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, rhs: &isize) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn le(&self, rhs: &isize) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn ge(&self, rhs: &isize) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

fn gt(&self, rhs: &isize) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

impl PartialOrd for Rows

Source§

fn partial_cmp(&self, other: &Rows) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Sub<Rows> for Row

Source§

type Output = Row

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Rows) -> Self

Performs the - operation. Read more
Source§

impl<T: Into<Rows>> Sub<T> for Rows

Source§

type Output = Rows

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self

Performs the - operation. Read more
Source§

impl SubAssign<Rows> for Row

Source§

fn sub_assign(&mut self, rhs: Rows)

Performs the -= operation. Read more
Source§

impl<T: Into<Rows>> SubAssign<T> for Rows

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a Rows> for Rows

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for Rows

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl VectorLike for Rows

A Rows or a Columns value can be treated as a Vector where the converse component is 0.

Source§

fn rows(&self) -> Rows

Source§

fn columns(&self) -> Columns

Source§

fn as_vector(&self) -> Vector

Source§

fn manhattan_length(&self) -> isize

Return the manhattan length of the vector. The manhattan length of a vector is the sum of the absolute values of its components. Read more
Source§

fn checked_manhattan_length(&self) -> Option<isize>

Return the manhattan length of the vector, or None if there are any overflows. Read more
Source§

fn clockwise(&self) -> Vector

Return a new vector, rotated 90 degrees clockwise. Read more
Source§

fn anticlockwise(&self) -> Vector

Return a new vector, rotated 90 degrees counterclockwise. Read more
Source§

fn reverse(&self) -> Vector

Return a new vector, facing the opposite direction of this one Read more
Source§

fn rotate(&self, rotation: Rotation) -> Vector

Return a new vector, rotated by a given rotation Read more
Source§

fn get_component<T: Component>(&self) -> T

Generically get either the Rows or Columns of a vector Read more
Source§

fn transpose(&self) -> Vector

Swap the rows and columns of this Vector Read more
Source§

fn direction(&self) -> Option<Direction>

If the vector is pointing in an orthogonal direction, return that direction Read more
Source§

impl Copy for Rows

Source§

impl Eq for Rows

Source§

impl StructuralPartialEq for Rows

Auto Trait Implementations§

§

impl Freeze for Rows

§

impl RefUnwindSafe for Rows

§

impl Send for Rows

§

impl Sync for Rows

§

impl Unpin for Rows

§

impl UnwindSafe for Rows

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