pub trait Field:
Sized
+ Eq
+ Clone
+ Debug
+ 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>
+ for<'a> DivUnsafe<&'a Self, Output = Self>
+ AddAssign
+ SubAssign
+ MulAssign
+ DivAssignUnsafe
+ for<'a> AddAssign<&'a Self>
+ for<'a> SubAssign<&'a Self>
+ for<'a> MulAssign<&'a Self>
+ for<'a> DivAssignUnsafe<&'a Self> {
type SelfRef<'a>: Add<&'a Self, Output = Self> + Sub<&'a Self, Output = Self> + Mul<&'a Self, Output = Self> + DivUnsafe<&'a Self, Output = Self>
where Self: 'a;
const ZERO: Self;
const ONE: Self;
// Required methods
fn double_assign(&mut self);
fn square_assign(&mut self);
// Provided method
fn invert(&self) -> Self { ... }
}
Expand description
This is a simplified trait for field elements.
Required Associated Constants§
Required Associated Types§
type SelfRef<'a>: Add<&'a Self, Output = Self> + Sub<&'a Self, Output = Self> + Mul<&'a Self, Output = Self> + DivUnsafe<&'a Self, Output = Self> where Self: 'a
Required Methods§
Sourcefn double_assign(&mut self)
fn double_assign(&mut self)
Doubles self
in-place.
Sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Square self
in-place
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.