pub trait Iris {
// Required methods
fn sepal_length(&self) -> f32;
fn sepal_width(&self) -> f32;
fn petal_length(&self) -> f32;
fn petal_width(&self) -> f32;
// Provided method
fn dist_sq(&self, other: &dyn Iris) -> f32 { ... }
}
Expand description
Iris functionalities that are independent of classification or lack of it.