pub trait GridPosition {
// Required methods
fn new(x: i32, y: i32) -> Self;
fn x(&self) -> i32;
fn y(&self) -> i32;
}Expand description
Trait to implement a type that can be used as a grid position.
This trait provides access to the x and y coordinates as well as a constructor used by the grid internaly.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.