Type Alias tabled::grid::config::Position

source ·
pub type Position = (usize, usize);
Expand description

Position is a (row, col) position on a Grid.

For example such table has 4 cells. Which indexes are (0, 0), (0, 1), (1, 0), (1, 1).

┌───┬───┐
│ 0 │ 1 │
├───┼───┤
│ 1 │ 2 │
└───┴───┘

Trait Implementations§

source§

impl From<Cell> for Position

Available on crate feature std only.
source§

fn from(Cell: Cell) -> Self

Converts to this type from the input type.
source§

impl<I> Object<I> for Position

Available on crate feature std only.
§

type Iter = EntityOnce

An Iterator which returns a list of cells.
source§

fn cells(&self, _: &I) -> Self::Iter

Cells returns a set of coordinates of cells.
source§

fn and<O>(self, rhs: O) -> UnionCombination<Self, O, R>
where Self: Sized,

Combines cells. It doesn’t repeat cells.
source§

fn not<O>(self, rhs: O) -> DiffCombination<Self, O, R>
where Self: Sized,

Excludes rhs cells from this cells.
source§

fn intersect<O>(self, rhs: O) -> IntersectionCombination<Self, O, R>
where Self: Sized,

Returns cells which are present in both Objects only.
source§

fn inverse(self) -> InversionCombination<Self, R>
where Self: Sized,

Returns cells which are not present in target Object.