Skip to main content

BinaryFieldElement

Trait BinaryFieldElement 

Source
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§

Required Methods§

Source

fn zero() -> Self

Source

fn one() -> Self

Source

fn from_poly(poly: Self::Poly) -> Self

Source

fn poly(&self) -> Self::Poly

Source

fn add(&self, other: &Self) -> Self

Source

fn mul(&self, other: &Self) -> Self

Source

fn inv(&self) -> Self

Source

fn pow(&self, exp: u64) -> Self

Provided Methods§

Source

fn from_bits(bits: u64) -> 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.

Implementors§