pub enum Direction {
LEFT,
RIGHT,
UP,
DOWN,
}Expand description
Used as parameters to the slide function.
§Examples
use cli_2048::Grid;
use cli_2048::Direction;
//Create a 4x4 grid
let grid = Grid::new(4, 4);
let grid = grid.slide(Direction::Up);
let grid = grid.slide(Direction::Down);
Variants§
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnwindSafe for Direction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more