Trait Drawable
andrew
pub trait Drawable { fn draw(&self, canvas: &mut Canvas<'_>); }
The Drawable trait allows object to be drawn to a buffer or canvas
fn draw(&self, canvas: &mut Canvas<'_>)
A function that draws the object to a canvas
impl Drawable for Line
impl Drawable for Rectangle
impl<'a> Drawable for Text<'a>