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 { ... }
}Expand description
The Root trait provides methods for computing the nth root of a number.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".