pub trait Movable {
    // Required methods
    fn max_speed(&self) -> Velocity;
    fn set_max_speed(&mut self, max_speed: Velocity);
    fn speed(&self) -> Velocity;
    fn set_speed(&mut self, speed: Velocity);
    fn acceleration(&self) -> Acceleration;
    fn set_acceleration(&mut self, acceleration: Acceleration);
}
Expand description

The Movable trait

Required Methods§

source

fn max_speed(&self) -> Velocity

Returns the max speed of the object as a Velocity.

source

fn set_max_speed(&mut self, max_speed: Velocity)

Sets the max speed of the object as a Velocity.

source

fn speed(&self) -> Velocity

Returns the current speed of the object as a Velocity.

source

fn set_speed(&mut self, speed: Velocity)

Sets the speed of the object as a Velocity.

source

fn acceleration(&self) -> Acceleration

Returns the current acceleration of the object as an Acceleration.

source

fn set_acceleration(&mut self, acceleration: Acceleration)

Sets the acceleration of the object as an Acceleration.

Implementors§