Skip to main content

IsMovable2D

Trait IsMovable2D 

Source
pub trait IsMovable2D {
    // Required method
    fn move_by(&mut self, x: f64, y: f64);
}
Expand description

IsMovable2D is a trait used for types within 2D space which can be moved

Required Methods§

Source

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

Should move the object by the given offset

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> IsMovable2D for LinkedList<T>
where T: IsMovable2D,

Source§

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

Source§

impl<T> IsMovable2D for Vec<T>
where T: IsMovable2D,

Source§

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

Source§

impl<T> IsMovable2D for VecDeque<T>
where T: IsMovable2D,

Source§

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

Implementors§