pub struct FieldElement(/* private fields */);Implementations§
Source§impl FieldElement
impl FieldElement
pub const ZERO: Self
pub const ONE: Self
pub const BETA: Self
pub fn from_bytes(bytes: &[u8; 32]) -> Option<Self>
pub fn mul_in_place(&mut self, rhs: &Self)
pub fn mul_int_in_place(&mut self, rhs: u32)
pub fn square_in_place(&mut self)
pub fn add_in_place(&mut self, rhs: &Self)
pub fn double_in_place(&mut self)
pub fn sub_in_place(&mut self, rhs: &Self)
pub fn add_int_in_place(&mut self, rhs: u32)
pub fn invert_in_place(&mut self)
pub fn sqrt_in_place_unchecked(&mut self)
pub fn sqrt_in_place(&mut self) -> bool
pub fn negate_in_place(&mut self, magnitude: u32)
pub fn normalize_in_place(&mut self)
pub fn is_odd(&self) -> bool
pub fn normalizes_to_zero(&self) -> bool
pub fn to_bytes(self) -> FieldBytes
Trait Implementations§
Source§impl AddAssign<u32> for FieldElement
impl AddAssign<u32> for FieldElement
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+= operation. Read moreSource§impl AddAssign for FieldElement
impl AddAssign for FieldElement
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for FieldElement
impl Clone for FieldElement
Source§fn clone(&self) -> FieldElement
fn clone(&self) -> FieldElement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldElement
impl Debug for FieldElement
Source§impl MulAssign<&FieldElement> for FieldElement
impl MulAssign<&FieldElement> for FieldElement
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
Performs the
*= operation. Read moreSource§impl MulAssign<u32> for FieldElement
impl MulAssign<u32> for FieldElement
Source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*= operation. Read moreSource§impl MulAssign for FieldElement
impl MulAssign for FieldElement
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl SubAssign for FieldElement
impl SubAssign for FieldElement
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for FieldElement
Auto Trait Implementations§
impl Freeze for FieldElement
impl RefUnwindSafe for FieldElement
impl Send for FieldElement
impl Sync for FieldElement
impl Unpin for FieldElement
impl UnwindSafe for FieldElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more