pub trait Field:
Sized
+ Clone
+ Copy
+ PartialEq
+ Send
+ Sync
+ DorySerialize
+ DoryDeserialize
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ Neg<Output = Self>
+ for<'a> Add<&'a Self, Output = Self>
+ for<'a> Sub<&'a Self, Output = Self>
+ for<'a> Mul<&'a Self, Output = Self> {
// Required methods
fn zero() -> Self;
fn one() -> Self;
fn is_zero(&self) -> bool;
fn add(&self, rhs: &Self) -> Self;
fn sub(&self, rhs: &Self) -> Self;
fn mul(&self, rhs: &Self) -> Self;
fn inv(self) -> Option<Self>;
fn random() -> Self;
fn from_u64(val: u64) -> Self;
fn from_i64(val: i64) -> Self;
}Required Methods§
fn zero() -> Self
fn one() -> Self
fn is_zero(&self) -> bool
fn add(&self, rhs: &Self) -> Self
fn sub(&self, rhs: &Self) -> Self
fn mul(&self, rhs: &Self) -> Self
fn inv(self) -> Option<Self>
fn random() -> Self
fn from_u64(val: u64) -> Self
fn from_i64(val: i64) -> 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.