pub trait ExactRoots:
Roots
+ Pow<u32, Output = Self>
+ Clone {
// Provided methods
fn nth_root_exact(&self, n: u32) -> Option<Self> { ... }
fn sqrt_exact(&self) -> Option<Self> { ... }
fn cbrt_exact(&self) -> Option<Self> { ... }
fn is_nth_power(&self, n: u32) -> bool { ... }
fn is_square(&self) -> bool { ... }
fn is_cubic(&self) -> bool { ... }
}
Expand description
Extension on num_integer::Roots to support perfect power check on integers
Provided Methods§
fn nth_root_exact(&self, n: u32) -> Option<Self>
fn sqrt_exact(&self) -> Option<Self>
fn cbrt_exact(&self) -> Option<Self>
fn is_nth_power(&self, n: u32) -> bool
fn is_square(&self) -> bool
fn is_cubic(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.