Enum chess::Rank[][src]

pub enum Rank {
    First,
    Second,
    Third,
    Fourth,
    Fifth,
    Sixth,
    Seventh,
    Eighth,
}

Describe a rank (row) on a chess board

Variants

Methods

impl Rank
[src]

Convert a usize into a Rank (the inverse of to_index). If the number is > 7, wrap around.

Go one rank down. If impossible, wrap around.

Go one file up. If impossible, wrap around.

Convert this Rank into a usize between 0 and 7 (inclusive).

Trait Implementations

impl Copy for Rank
[src]

impl Clone for Rank
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Rank
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Rank
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Debug for Rank
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Rank

impl Sync for Rank