pub enum MatrixLocation {
Row(usize),
Col(usize),
Coordinates(MatrixCoordinates),
Range(MatrixRange),
}
Expand description
Location in a 2D matrix.
Variants§
Row(usize)
Entire row in a matrix.
Col(usize)
Entire column in a matrix.
Coordinates(MatrixCoordinates)
Specific coordinates in a matrix.
Range(MatrixRange)
2D area in a matrix.
Implementations§
Source§impl MatrixLocation
impl MatrixLocation
Trait Implementations§
Source§impl Add<MatrixCoordinates> for MatrixLocation
impl Add<MatrixCoordinates> for MatrixLocation
Source§type Output = MatrixLocation
type Output = MatrixLocation
The resulting type after applying the
+
operator.Source§impl Add for MatrixLocation
impl Add for MatrixLocation
Source§type Output = MatrixLocation
type Output = MatrixLocation
The resulting type after applying the
+
operator.Source§impl AddAssign<MatrixCoordinates> for MatrixLocation
impl AddAssign<MatrixCoordinates> for MatrixLocation
Source§fn add_assign(&mut self, rhs: MatrixCoordinates)
fn add_assign(&mut self, rhs: MatrixCoordinates)
Performs the
+=
operation. Read moreSource§impl AddAssign for MatrixLocation
impl AddAssign for MatrixLocation
Source§fn add_assign(&mut self, rhs: MatrixLocation)
fn add_assign(&mut self, rhs: MatrixLocation)
Performs the
+=
operation. Read moreSource§impl Clone for MatrixLocation
impl Clone for MatrixLocation
Source§fn clone(&self) -> MatrixLocation
fn clone(&self) -> MatrixLocation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MatrixLocation
impl Debug for MatrixLocation
Source§impl Default for MatrixLocation
impl Default for MatrixLocation
Source§impl<'de> Deserialize<'de> for MatrixLocation
impl<'de> Deserialize<'de> for MatrixLocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Domain2D for MatrixLocation
impl Domain2D for MatrixLocation
Source§fn range(&self) -> MatrixRange
fn range(&self) -> MatrixRange
The area spanned by this domain.
Source§fn start(&self) -> MatrixCoordinates
fn start(&self) -> MatrixCoordinates
Starting coordinate of this domain (inclusive).
Source§fn end(&self) -> MatrixCoordinates
fn end(&self) -> MatrixCoordinates
Ending coordinate of this domain (exclusive).
Source§impl From<MatrixCoordinates> for MatrixLocation
impl From<MatrixCoordinates> for MatrixLocation
Source§fn from(value: MatrixCoordinates) -> Self
fn from(value: MatrixCoordinates) -> Self
Converts to this type from the input type.
Source§impl From<MatrixRange> for MatrixLocation
impl From<MatrixRange> for MatrixLocation
Source§fn from(value: MatrixRange) -> Self
fn from(value: MatrixRange) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MatrixLocation
impl PartialEq for MatrixLocation
Source§impl Serialize for MatrixLocation
impl Serialize for MatrixLocation
Source§impl Sub<MatrixCoordinates> for MatrixLocation
impl Sub<MatrixCoordinates> for MatrixLocation
Source§type Output = MatrixLocation
type Output = MatrixLocation
The resulting type after applying the
-
operator.Source§impl Sub for MatrixLocation
impl Sub for MatrixLocation
Source§type Output = MatrixLocation
type Output = MatrixLocation
The resulting type after applying the
-
operator.Source§impl SubAssign<MatrixCoordinates> for MatrixLocation
impl SubAssign<MatrixCoordinates> for MatrixLocation
Source§fn sub_assign(&mut self, rhs: MatrixCoordinates)
fn sub_assign(&mut self, rhs: MatrixCoordinates)
Performs the
-=
operation. Read moreSource§impl SubAssign for MatrixLocation
impl SubAssign for MatrixLocation
Source§fn sub_assign(&mut self, rhs: MatrixLocation)
fn sub_assign(&mut self, rhs: MatrixLocation)
Performs the
-=
operation. Read moreimpl Copy for MatrixLocation
impl StructuralPartialEq for MatrixLocation
Auto Trait Implementations§
impl Freeze for MatrixLocation
impl RefUnwindSafe for MatrixLocation
impl Send for MatrixLocation
impl Sync for MatrixLocation
impl Unpin for MatrixLocation
impl UnwindSafe for MatrixLocation
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<D, T> Contains2D<D> for T
impl<D, T> Contains2D<D> for T
Source§impl<T> Contains2D<MatrixCoordinates> for Twhere
T: Domain2D,
impl<T> Contains2D<MatrixCoordinates> for Twhere
T: Domain2D,
Source§impl<D> Dimensions2D for Dwhere
D: Domain2D,
impl<D> Dimensions2D for Dwhere
D: Domain2D,
Source§fn dimensions(&self) -> MatrixDimensions
fn dimensions(&self) -> MatrixDimensions
Dimensions of the output as a dimensions object.