Skip to main content

Drawable

Trait Drawable 

Source
pub trait Drawable {
    // Required methods
    fn draw(&self);
    fn area(&self) -> f64;
}
Expand description

A trait for drawable objects

Required Methods§

Source

fn draw(&self)

Source

fn area(&self) -> f64

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§