trait KeyPainter {
// Required methods
fn width(&self) -> f32;
fn height(&self) -> f32;
fn draw_background(&mut self) -> Result<(), KeyPaintError>;
fn draw_key(
&mut self,
keybox: &BoundingBox,
colour: &KeyColour,
label: &KeyLabel,
keycode: Code,
) -> Result<(), KeyPaintError>;
}Required Methods§
fn width(&self) -> f32
fn height(&self) -> f32
fn draw_background(&mut self) -> Result<(), KeyPaintError>
fn draw_key( &mut self, keybox: &BoundingBox, colour: &KeyColour, label: &KeyLabel, keycode: Code, ) -> Result<(), KeyPaintError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".