[][src]Trait pathfinder::Location

pub trait Location {
    fn position(&self) -> Coordinate;

    fn eq<L: Location>(&self, other: &L) -> bool { ... }
fn x(&self) -> i16 { ... }
fn y(&self) -> i16 { ... }
fn sum(&self) -> i16 { ... } }

Enables the structure to be located by X or Y.

Required methods

fn position(&self) -> Coordinate

Retrieves the position Coordinates.

Loading content...

Provided methods

fn eq<L: Location>(&self, other: &L) -> bool

Returns if the positions are equal or not.

fn x(&self) -> i16

Retrieves the X coordinate.

fn y(&self) -> i16

Retrieves the Y coordinate.

fn sum(&self) -> i16

Returns the sum of the x and y value.

Loading content...

Implementors

impl Location for Coordinate
[src]

fn eq<L: Location>(&self, other: &L) -> bool
[src]

fn x(&self) -> i16
[src]

fn y(&self) -> i16
[src]

fn sum(&self) -> i16
[src]

impl Location for Group
[src]

fn eq<L: Location>(&self, other: &L) -> bool
[src]

fn x(&self) -> i16
[src]

fn y(&self) -> i16
[src]

fn sum(&self) -> i16
[src]

impl Location for HL
[src]

fn eq<L: Location>(&self, other: &L) -> bool
[src]

fn x(&self) -> i16
[src]

fn y(&self) -> i16
[src]

fn sum(&self) -> i16
[src]

impl Location for Node
[src]

fn eq<L: Location>(&self, other: &L) -> bool
[src]

fn x(&self) -> i16
[src]

fn y(&self) -> i16
[src]

fn sum(&self) -> i16
[src]

Loading content...