pub trait BasicShape {
// Required methods
fn scale(&mut self, width: f32, height: f32) -> &mut Self;
fn pos(&mut self, x: f32, y: f32) -> &mut Self;
fn rotation(&mut self, rotation: f32) -> &mut Self;
fn color(&mut self, red: f32, green: f32, blue: f32) -> &mut Self;
fn color_from_color(&mut self, color: Color) -> &mut Self;
fn layer(&mut self, layer: u16) -> &mut Self;
fn to_instance(&self) -> Instance;
}Required Methods§
Sourcefn color_from_color(&mut self, color: Color) -> &mut Self
fn color_from_color(&mut self, color: Color) -> &mut Self
fill color of the shape
Sourcefn layer(&mut self, layer: u16) -> &mut Self
fn layer(&mut self, layer: u16) -> &mut Self
render layer of the shape
higher layer -> foreground
fn to_instance(&self) -> Instance
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".