pub trait ScientificInteger: ScientificNumber + Eq {
// Required methods
fn gcd(self, other: Self) -> Self;
fn lcm(self, other: Self) -> Self;
fn is_prime(self) -> bool;
fn is_even(self) -> bool;
fn is_odd(self) -> bool;
fn mod_pow(self, exp: Self, modulus: Self) -> Self;
fn factorial(self) -> Result<Self, CoreError>;
fn binomial(self, k: Self) -> Self;
}Expand description
A trait for integers that can be used in scientific calculations
Required Methods§
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.