Skip to main content

Locatable

Trait Locatable 

Source
pub trait Locatable {
    // Required methods
    fn location(&self) -> (i32, i32);
    fn set_location(&mut self, x: i32, y: i32);
}
Expand description

Trait for primitives that have a location.

Required Methods§

Source

fn location(&self) -> (i32, i32)

Get the location as (x, y) raw coordinate values.

Source

fn set_location(&mut self, x: i32, y: i32)

Set the location.

Implementors§