pub trait Field:
Sized
+ Clone
+ Copy
+ Default
+ PartialEq
+ Eq
+ Debug
+ Display {
const ZERO: Self;
const ONE: Self;
// Required methods
fn is_zero(&self) -> bool;
fn wrapping_add(self, other: Self) -> Self;
fn wrapping_sub(self, other: Self) -> Self;
fn wrapping_mul(self, other: Self) -> Self;
fn wrapping_neg(self) -> Self;
fn square(self) -> Self;
fn double(self) -> Self;
fn checked_inv(self) -> Option<Self>;
fn frobenius_map(self, power: usize) -> Self;
// Provided methods
fn wrapping_div(self, other: Self) -> Self { ... }
fn pow<S: BitIterBE>(self, exp: S) -> Self { ... }
}Required Associated Constants§
Required Methods§
fn is_zero(&self) -> bool
fn wrapping_add(self, other: Self) -> Self
fn wrapping_sub(self, other: Self) -> Self
fn wrapping_mul(self, other: Self) -> Self
fn wrapping_neg(self) -> Self
fn square(self) -> Self
fn double(self) -> Self
fn checked_inv(self) -> Option<Self>
fn frobenius_map(self, power: usize) -> Self
Provided Methods§
fn wrapping_div(self, other: Self) -> Self
fn pow<S: BitIterBE>(self, exp: S) -> Self
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.