pub trait Pixel: Copy + Into<f64> { // Required method fn from_f64(f: f64) -> Self; // Provided method fn cast<P>(self) -> P where P: Pixel { ... } }