pub trait Field:
Sized
+ Eq
+ Copy
+ Clone
+ Default
+ Send
+ Sync
+ Debug
+ Display
+ Hash
+ 'static
+ Neg<Output = Self>
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ for<'a> Add<&'a Self, Output = Self>
+ for<'a> Sub<&'a Self, Output = Self>
+ for<'a> Mul<&'a Self, Output = Self>
+ Sum
+ Product
+ for<'a> Sum<&'a Self>
+ for<'a> Product<&'a Self>
+ AddAssign
+ SubAssign
+ MulAssign
+ for<'a> AddAssign<&'a Self>
+ for<'a> SubAssign<&'a Self>
+ for<'a> MulAssign<&'a Self>
+ Square
+ InvertOrZero
+ Random
+ Zeroable
+ SerializeBytes
+ DeserializeBytes {
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 invert(&self) -> Option<Self> { ... }
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", so this trait is not object safe.