pub trait Drawable: Send {
fn content(&self) -> Vec<&dyn Drawable>;
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>;
fn step(&mut self);
fn state(&self) -> State;
fn draw(
&self,
_canvas: &mut Canvas<Window>,
_position: &Position,
_settings: DrawSettings
);
fn register(&mut self) { ... }
fn load(&mut self) { ... }
fn event(&mut self, e: Event) { ... }
fn update(&mut self, dt: f64) { ... }
}
Expand description
An object that can be drawn
Required Methods
sourcefn content_mut(&mut self) -> Vec<&mut dyn Drawable>
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
What this object contains, mutably