[][src]Trait gridly::VectorComponent

pub trait VectorComponent: Sized + From<isize> + Copy + Ord + Eq + Debug + Add + Sub + Default + PartialEq<isize> + PartialOrd<isize> {
    type Converse: Component<Converse = Self>;
    type Point: LocComponent;
    fn from_vector(vector: &Vector) -> Self;
fn combine(self, converse: Self::Converse) -> Vector;
fn name() -> &'static str;
fn value(self) -> isize; fn transpose(self) -> Self::Converse { ... } }

A Rows or Columns component of a Vector

Associated Types

type Converse: Component<Converse = Self>

The converse component (Rows to Columns or vice versa)

type Point: LocComponent

The assoicated location component type (Row or Column)

Loading content...

Required methods

fn from_vector(vector: &Vector) -> Self

Get this compnent from a Vector

fn combine(self, converse: Self::Converse) -> Vector

Create a vector from a Row and Column

fn name() -> &'static str

Return the lowercase name of this type of component, "rows" or "columns".

fn value(self) -> isize

Get the integer value of this component

Loading content...

Provided methods

fn transpose(self) -> Self::Converse

Loading content...

Implementors

impl Component for Columns[src]

type Converse = Rows

type Point = Column

fn transpose(self) -> Self::Converse[src]

impl Component for Rows[src]

type Converse = Columns

type Point = Row

fn transpose(self) -> Self::Converse[src]

Loading content...