pub trait GetXY { // Required methods fn x(&self) -> f64; fn y(&self) -> f64; // Provided method fn xy(&self) -> (f64, f64) { ... } }
Trait to extract the x and y values
Returns the x value
Returns the y value
Returns the x and y values