snark_verifier::util::arithmetic

Trait FieldOps

Source
pub trait FieldOps:
    Sized
    + 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>
    + AddAssign
    + SubAssign
    + MulAssign
    + for<'a> AddAssign<&'a Self>
    + for<'a> SubAssign<&'a Self>
    + for<'a> MulAssign<&'a Self> {
    // Required method
    fn invert(&self) -> Option<Self>;
}
Expand description

Operations that could be done with field elements.

Required Methods§

Source

fn invert(&self) -> Option<Self>

Returns multiplicative inversion if any.

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§

Source§

impl FieldOps for snark_verifier::loader::evm::Scalar

Source§

impl<C: CurveAffine, EccChip: EccInstructions<C>> FieldOps for snark_verifier::loader::halo2::Scalar<C, EccChip>

Source§

impl<F: PrimeField> FieldOps for F