pub trait Draw {
fn draw(&self, canvas: &mut dyn Canvas) -> DrawResult<()> { ... }
fn draw_mut(&mut self, canvas: &mut dyn Canvas) -> DrawResult<()> { ... }
}
Expand description
Something that knows how to draw itself onto the canvas
pub trait Draw {
fn draw(&self, canvas: &mut dyn Canvas) -> DrawResult<()> { ... }
fn draw_mut(&mut self, canvas: &mut dyn Canvas) -> DrawResult<()> { ... }
}
Something that knows how to draw itself onto the canvas