Skip to main content

SetXY

Trait SetXY 

Source
pub trait SetXY {
    // Required methods
    fn set_x(&mut self, x: f64);
    fn set_y(&mut self, y: f64);

    // Provided method
    fn set_xy(&mut self, x: f64, y: f64) { ... }
}
Expand description

Trait to set the x and y values

Required Methods§

Source

fn set_x(&mut self, x: f64)

Set the x value

Source

fn set_y(&mut self, y: f64)

Set the y value

Provided Methods§

Source

fn set_xy(&mut self, x: f64, y: f64)

Set both x and y

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SetXY for (f64, f64)

Source§

fn set_x(&mut self, x: f64)

Source§

fn set_y(&mut self, y: f64)

Source§

impl SetXY for (f64, f64, f64)

Source§

fn set_x(&mut self, x: f64)

Source§

fn set_y(&mut self, y: f64)

Implementors§