Field

Trait Field 

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

Source

const ZERO: Self

Source

const ONE: Self

Required Methods§

Source

fn is_zero(&self) -> bool

Source

fn wrapping_add(self, other: Self) -> Self

Source

fn wrapping_sub(self, other: Self) -> Self

Source

fn wrapping_mul(self, other: Self) -> Self

Source

fn wrapping_neg(self) -> Self

Source

fn square(self) -> Self

Source

fn double(self) -> Self

Source

fn checked_inv(self) -> Option<Self>

Source

fn frobenius_map(self, power: usize) -> Self

Provided Methods§

Source

fn wrapping_div(self, other: Self) -> Self

Source

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.

Implementors§