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§
sourcefn set_max_speed(&mut self, max_speed: Velocity)
fn set_max_speed(&mut self, max_speed: Velocity)
Sets the max speed of the object as a Velocity.
sourcefn acceleration(&self) -> Acceleration
fn acceleration(&self) -> Acceleration
Returns the current acceleration of the object as an Acceleration.
sourcefn set_acceleration(&mut self, acceleration: Acceleration)
fn set_acceleration(&mut self, acceleration: Acceleration)
Sets the acceleration of the object as an Acceleration.