pub trait PointBase<C: CoordinateBase> {
// Required methods
fn new(x: C::Coord, y: C::Coord) -> Self;
fn get(&self, orient: Orientation2D) -> C::Coord;
fn set(&mut self, orient: Orientation2D, value: C::Coord);
// Provided methods
fn x(&self) -> C::Coord { ... }
fn y(&self) -> C::Coord { ... }
}Expand description
Basic traits to get and set Kartesian coordinates of a point in the two-dimensional plane.
Required Methods§
Sourcefn get(&self, orient: Orientation2D) -> C::Coord
fn get(&self, orient: Orientation2D) -> C::Coord
Get a coordinate value.
Sourcefn set(&mut self, orient: Orientation2D, value: C::Coord)
fn set(&mut self, orient: Orientation2D, value: C::Coord)
Set a coordinate value.
Provided 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.