[][src]Struct zkp_primefield::FieldElement

pub struct FieldElement(_);

Methods

impl FieldElement[src]

pub const GENERATOR: Self[src]

pub const MODULUS: U256[src]

Prime modulus of the field.

Equal to (1 << 59) | (1 << 4) | 1.

pub const NEGATIVE_ONE: Self[src]

pub const ONE: Self[src]

pub const ZERO: Self[src]

pub const fn from_u256_const(n: &U256) -> Self[src]

pub const fn from_montgomery(n: U256) -> Self[src]

pub fn from_hex_str(s: &str) -> Self[src]

pub fn as_montgomery(&self) -> &U256[src]

pub fn is_zero(&self) -> bool[src]

pub fn is_one(&self) -> bool[src]

pub fn inv(&self) -> Option<Self>[src]

pub fn double(&self) -> Self[src]

pub fn triple(&self) -> Self[src]

pub fn square(&self) -> Self[src]

pub fn square_root(&self) -> Option<Self>[src]

pub fn neg_assign(&mut self)[src]

pub fn pow<T: Into<U256>>(&self, exponent: T) -> Self[src]

pub fn root<T: Into<U256>>(n: T) -> Option<Self>[src]

impl FieldElement[src]

pub fn to_u8(&self) -> u8[src]

pub fn to_u16(&self) -> u16[src]

pub fn to_u32(&self) -> u32[src]

pub fn to_u64(&self) -> u64[src]

pub fn to_u128(&self) -> u128[src]

pub fn to_usize(&self) -> usize[src]

pub fn to_i8(&self) -> i8[src]

pub fn to_i16(&self) -> i16[src]

pub fn to_i32(&self) -> i32[src]

pub fn to_i64(&self) -> i64[src]

pub fn to_i128(&self) -> i128[src]

pub fn to_isize(&self) -> isize[src]

Trait Implementations

impl Eq for FieldElement[src]

impl Clone for FieldElement[src]

impl PartialEq<FieldElement> for FieldElement[src]

impl From<u8> for FieldElement[src]

impl From<u16> for FieldElement[src]

impl From<u32> for FieldElement[src]

impl From<u64> for FieldElement[src]

impl From<u128> for FieldElement[src]

impl From<usize> for FieldElement[src]

impl From<i8> for FieldElement[src]

impl From<i16> for FieldElement[src]

impl From<i32> for FieldElement[src]

impl From<i64> for FieldElement[src]

impl From<i128> for FieldElement[src]

impl From<isize> for FieldElement[src]

impl From<U256> for FieldElement[src]

impl<'_> From<&'_ U256> for FieldElement[src]

impl From<FieldElement> for U256[src]

impl<'_> From<&'_ FieldElement> for U256[src]

impl Add<FieldElement> for FieldElement

type Output = Self

The resulting type after applying the + operator.

impl<'_> Add<&'_ FieldElement> for FieldElement

type Output = Self

The resulting type after applying the + operator.

impl<'_> Add<FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the + operator.

impl Sub<FieldElement> for FieldElement

type Output = Self

The resulting type after applying the - operator.

impl<'_> Sub<&'_ FieldElement> for FieldElement

type Output = Self

The resulting type after applying the - operator.

impl<'_> Sub<FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the - operator.

impl<'_, '_> Sub<&'_ FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the - operator.

impl Mul<FieldElement> for FieldElement

type Output = Self

The resulting type after applying the * operator.

impl<'_> Mul<&'_ FieldElement> for FieldElement

type Output = Self

The resulting type after applying the * operator.

impl<'_> Mul<FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the * operator.

impl<'_, '_> Mul<&'_ FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the * operator.

impl Div<FieldElement> for FieldElement

type Output = Self

The resulting type after applying the / operator.

impl<'_> Div<&'_ FieldElement> for FieldElement

type Output = Self

The resulting type after applying the / operator.

impl<'_> Div<FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the / operator.

impl<'_, '_> Div<&'_ FieldElement> for &'_ FieldElement

type Output = FieldElement

The resulting type after applying the / operator.

impl<'_> Neg for &'_ FieldElement[src]

type Output = FieldElement

The resulting type after applying the - operator.

impl<'_> AddAssign<&'_ FieldElement> for FieldElement[src]

impl AddAssign<FieldElement> for FieldElement

impl<'_> SubAssign<&'_ FieldElement> for FieldElement[src]

impl SubAssign<FieldElement> for FieldElement

impl<'_> MulAssign<&'_ FieldElement> for FieldElement[src]

impl MulAssign<FieldElement> for FieldElement

impl<'_> DivAssign<&'_ FieldElement> for FieldElement[src]

impl DivAssign<FieldElement> for FieldElement

impl Debug for FieldElement[src]

impl Product<FieldElement> for FieldElement[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]