Skip to main content

GetXY

Trait GetXY 

Source
pub trait GetXY {
    // Required methods
    fn x(&self) -> f64;
    fn y(&self) -> f64;

    // Provided method
    fn xy(&self) -> (f64, f64) { ... }
}
Expand description

Trait to extract the x and y values

Required Methods§

Source

fn x(&self) -> f64

Returns the x value

Source

fn y(&self) -> f64

Returns the y value

Provided Methods§

Source

fn xy(&self) -> (f64, f64)

Returns the x and y values

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl GetXY for (f64, f64)

Source§

fn x(&self) -> f64

Source§

fn y(&self) -> f64

Source§

impl GetXY for (f64, f64, f64)

Source§

fn x(&self) -> f64

Source§

fn y(&self) -> f64

Implementors§