Enum chess::File [] [src]

pub enum File {
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
}

Describe a file (column) on a chess board

Variants

Methods

impl File
[src]

Convert a usize into a File (the inverse of to_index). If i > 7, wrap around.

Go one file to the left. If impossible, wrap around.

Go one file to the right. If impossible, wrap around.

Convert this File into a usize from 0 to 7 inclusive.

Trait Implementations

impl Copy for File
[src]

impl Clone for File
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for File
[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 File
[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