pub trait Field:
PackedField<Scalar = Self>
+ Display
+ Hash
+ SerializeBytes
+ DeserializeBytes
+ FixedSizeSerializeBytes {
const ZERO: Self;
const ONE: Self;
const CHARACTERISTIC: usize;
const ORDER_EXPONENT: usize;
const MULTIPLICATIVE_GENERATOR: Self;
// Required method
fn double(&self) -> Self;
// Provided methods
fn is_zero(&self) -> bool { ... }
fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self { ... }
}Expand description
An element of a finite field.
A finite field (also called a Galois field) has order p^k where p is the
CHARACTERISTIC and k is the
ORDER_EXPONENT.
Required Associated Constants§
Sourceconst CHARACTERISTIC: usize
const CHARACTERISTIC: usize
The characteristic p of the field. The field order is p^k where k is
ORDER_EXPONENT.
Sourceconst ORDER_EXPONENT: usize
const ORDER_EXPONENT: usize
The exponent k such that the field order equals CHARACTERISTIC^k.
Sourceconst MULTIPLICATIVE_GENERATOR: Self
const MULTIPLICATIVE_GENERATOR: Self
Fixed generator of the multiplicative group.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".