pub trait GridPoint:
Eq
+ PartialEq
+ Clone {
// Required methods
fn up(&self) -> Self;
fn down(&self) -> Self;
fn left(&self) -> Self;
fn right(&self) -> Self;
fn position(&self, scale: f64) -> (f64, f64, f64);
}
Expand description
A point on a surface grid.
A type implementing this trait should ensure that the following conditions are met:
- Two points are equal if they point to the same physical location on the grid.
A point on the grid must also be associated with some direction. For surfaces that loop this should work such that moving in the same direction will eventually result in reaching the point at which you started moving.
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.