pub trait EuclideanDomain:
Ring
+ Div<Output = Self>
+ Rem<Output = Self> {
// Required methods
fn div_rem(&self, other: &Self) -> (Self, Self);
fn abs(&self) -> Self;
// Provided method
fn gcd(&self, other: &Self) -> Self { ... }
}Expand description
Euclidean domain: ring with division algorithm
A Euclidean domain is a ring where division with remainder is defined.
Examples: integers Z, polynomials K[x] over field K, Gaussian integers Z[i]
Key property: For any a, b ≠ 0, exists q, r such that a = q*b + r where either r = 0 or deg(r) < deg(b)
Required Methods§
Provided 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.