Trait Position

Source
pub trait Position {
    // Required methods
    fn row(&self) -> usize;
    fn column(&self) -> usize;

    // Provided method
    fn coordinates(&self) -> (usize, usize) { ... }
}
Expand description

A position.

Required Methods§

Source

fn row(&self) -> usize

Return the row.

Source

fn column(&self) -> usize

Return the column.

Provided Methods§

Source

fn coordinates(&self) -> (usize, usize)

Return the row and column.

Implementations on Foreign Types§

Source§

impl Position for (usize, usize)

Source§

fn row(&self) -> usize

Source§

fn column(&self) -> usize

Source§

impl Position for usize

Source§

fn row(&self) -> usize

Source§

fn column(&self) -> usize

Implementors§