pub trait Drawable<DB: DrawingBackend> {
// Required method
fn draw<I: Iterator<Item = BackendCoord>>(
&self,
pos: I,
backend: &mut DB,
) -> Result<(), DrawingErrorKind<DB::ErrorType>>;
}
Expand description
The trait indicates we are able to draw it on a drawing area
Required Methods§
Sourcefn draw<I: Iterator<Item = BackendCoord>>(
&self,
pos: I,
backend: &mut DB,
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
fn draw<I: Iterator<Item = BackendCoord>>( &self, pos: I, backend: &mut DB, ) -> Result<(), DrawingErrorKind<DB::ErrorType>>
Actually draws the element. The key points is already translated into the image cooridnate and can be used by DC directly
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.