pub trait BinaryFieldElement:
Send
+ Sync
+ Sized
+ Copy
+ Clone
+ Default
+ PartialEq
+ Eq
+ Debug {
type Poly: BinaryPolynomial;
// Required methods
fn zero() -> Self;
fn one() -> Self;
fn from_poly(poly: Self::Poly) -> Self;
fn poly(&self) -> Self::Poly;
fn add(&self, other: &Self) -> Self;
fn mul(&self, other: &Self) -> Self;
fn inv(&self) -> Self;
fn pow(&self, exp: u64) -> Self;
// Provided method
fn from_bits(bits: u64) -> Self { ... }
}Required Associated Types§
type Poly: BinaryPolynomial
Required Methods§
fn zero() -> Self
fn one() -> Self
fn from_poly(poly: Self::Poly) -> Self
fn poly(&self) -> Self::Poly
fn add(&self, other: &Self) -> Self
fn mul(&self, other: &Self) -> Self
fn inv(&self) -> Self
fn pow(&self, exp: u64) -> Self
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.