pub trait Gcd<Rhs = Self>: Sized {
type Output;
// Required methods
fn gcd(&self, rhs: &Rhs) -> Self::Output;
fn gcd_vartime(&self, rhs: &Rhs) -> Self::Output;
}
Expand description
Compute the greatest common divisor of two integers.
Required Associated Types§
Required Methods§
Sourcefn gcd_vartime(&self, rhs: &Rhs) -> Self::Output
fn gcd_vartime(&self, rhs: &Rhs) -> Self::Output
Compute the greatest common divisor of self
and rhs
in variable time.
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.