pub trait Measured2d {
// Required methods
fn perimeter(&self) -> f32;
fn area(&self) -> f32;
}
Expand description
A trait for getting measurements of 2D shapes
pub trait Measured2d {
// Required methods
fn perimeter(&self) -> f32;
fn area(&self) -> f32;
}
A trait for getting measurements of 2D shapes