pub trait Root {
type Output;
// Required method
fn nth_root(&self, n: u32) -> Self::Output;
// Provided methods
fn sqrt(&self) -> Self::Output { ... }
fn cbrt(&self) -> Self::Output { ... }
}
pub trait Root {
type Output;
// Required method
fn nth_root(&self, n: u32) -> Self::Output;
// Provided methods
fn sqrt(&self) -> Self::Output { ... }
fn cbrt(&self) -> Self::Output { ... }
}