pub trait Field:
Copy
+ Eq
+ Debug {
const MULTILINEAR: bool;
// Required methods
fn zero() -> Self;
fn one() -> Self;
fn add(self, o: Self) -> Self;
fn sub(self, o: Self) -> Self;
fn mul(self, o: Self) -> Self;
fn inv(self) -> Self;
// Provided method
fn is_zero(self) -> bool { ... }
}Expand description
A finite field small enough to enumerate — the arithmetic XL runs its linear algebra over.
Required Associated Constants§
Sourceconst MULTILINEAR: bool
const MULTILINEAR: bool
Whether the polynomial ring is multilinear (x² = x). True for GF(2), where we impose
the field equations; false for GF(256), where quadratics are genuine.
Required Methods§
fn zero() -> Self
fn one() -> Self
fn add(self, o: Self) -> Self
fn sub(self, o: Self) -> Self
fn mul(self, o: Self) -> Self
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.