pub trait Point2D {
type Output: Copy + Add;
// Required methods
fn get_x(&self) -> Self::Output;
fn get_y(&self) -> Self::Output;
fn new(x: Self::Output, y: Self::Output) -> Self;
// Provided methods
fn new_f64(x: f64, y: f64) -> Double2D { ... }
fn new_f32(x: f32, y: f32) -> Float2D { ... }
}
Expand description
Geometric point in Cartesian 2D Space. X and Y values.
Required Associated Types§
Required Methods§
fn get_x(&self) -> Self::Output
fn get_y(&self) -> Self::Output
fn new(x: Self::Output, y: Self::Output) -> Self
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.