[−][src]Struct zkp_primefield::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 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]
fn from(n: FieldElement) -> Self
[src]
impl<'_> From<&'_ FieldElement> for U256
[src]
fn from(n: &FieldElement) -> Self
[src]
impl Clone for FieldElement
[src]
fn clone(&self) -> FieldElement
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for FieldElement
[src]
impl PartialEq<FieldElement> for FieldElement
[src]
fn eq(&self, other: &FieldElement) -> bool
[src]
fn ne(&self, other: &FieldElement) -> bool
[src]
impl Debug for FieldElement
[src]
impl Sub<FieldElement> for FieldElement
impl<'_> Sub<&'_ FieldElement> for FieldElement
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: &Self) -> Self
impl<'_> Sub<FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the -
operator.
fn sub(self, rhs: FieldElement) -> FieldElement
impl<'_, '_> Sub<&'_ FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the -
operator.
fn sub(self, rhs: &FieldElement) -> FieldElement
impl Div<FieldElement> for FieldElement
impl<'_> Div<&'_ FieldElement> for FieldElement
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: &Self) -> Self
impl<'_> Div<FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the /
operator.
fn div(self, rhs: FieldElement) -> FieldElement
impl<'_, '_> Div<&'_ FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the /
operator.
fn div(self, rhs: &FieldElement) -> FieldElement
impl Add<FieldElement> for FieldElement
impl<'_> Add<&'_ FieldElement> for FieldElement
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: &Self) -> Self
impl<'_> Add<FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the +
operator.
fn add(self, rhs: FieldElement) -> FieldElement
impl<'_, '_> Add<&'_ FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the +
operator.
fn add(self, rhs: &FieldElement) -> FieldElement
impl Mul<FieldElement> for FieldElement
impl<'_> Mul<&'_ FieldElement> for FieldElement
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: &Self) -> Self
impl<'_> Mul<FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the *
operator.
fn mul(self, rhs: FieldElement) -> FieldElement
impl<'_, '_> Mul<&'_ FieldElement> for &'_ FieldElement
type Output = FieldElement
The resulting type after applying the *
operator.
fn mul(self, rhs: &FieldElement) -> FieldElement
impl<'_> Neg for &'_ FieldElement
[src]
type Output = FieldElement
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<'_> AddAssign<&'_ FieldElement> for FieldElement
[src]
fn add_assign(&mut self, rhs: &Self)
[src]
impl AddAssign<FieldElement> for FieldElement
fn add_assign(&mut self, rhs: Self)
impl<'_> SubAssign<&'_ FieldElement> for FieldElement
[src]
fn sub_assign(&mut self, rhs: &Self)
[src]
impl SubAssign<FieldElement> for FieldElement
fn sub_assign(&mut self, rhs: Self)
impl<'_> MulAssign<&'_ FieldElement> for FieldElement
[src]
fn mul_assign(&mut self, rhs: &Self)
[src]
impl MulAssign<FieldElement> for FieldElement
fn mul_assign(&mut self, rhs: Self)
impl<'_> DivAssign<&'_ FieldElement> for FieldElement
[src]
fn div_assign(&mut self, rhs: &Self)
[src]
impl DivAssign<FieldElement> for FieldElement
fn div_assign(&mut self, rhs: Self)
impl Product<FieldElement> for FieldElement
[src]
fn product<I: Iterator<Item = FieldElement>>(iter: I) -> Self
[src]
Auto Trait Implementations
impl Send for FieldElement
impl Sync for FieldElement
impl Unpin for FieldElement
impl RefUnwindSafe for FieldElement
impl UnwindSafe for FieldElement
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,