Struct ml_dsa::algebra::FieldElement
source · pub struct FieldElement(pub Integer);
Expand description
An element of GF(q). Although q
is only 16 bits wide, we use a wider uint type to so that we
can defer modular reductions.
Tuple Fields§
§0: Integer
Implementations§
Trait Implementations§
source§impl Add for FieldElement
impl Add for FieldElement
source§impl Clone for FieldElement
impl Clone for FieldElement
source§fn clone(&self) -> FieldElement
fn clone(&self) -> FieldElement
Returns a copy 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 Default for FieldElement
impl Default for FieldElement
source§fn default() -> FieldElement
fn default() -> FieldElement
Returns the “default value” for a type. Read more
source§impl Mul<&Polynomial> for FieldElement
impl Mul<&Polynomial> for FieldElement
§type Output = Polynomial
type Output = Polynomial
The resulting type after applying the
*
operator.source§fn mul(self, rhs: &Polynomial) -> Polynomial
fn mul(self, rhs: &Polynomial) -> Polynomial
Performs the
*
operation. Read moresource§impl Mul for FieldElement
impl Mul for FieldElement
§type Output = FieldElement
type Output = FieldElement
The resulting type after applying the
*
operator.source§fn mul(self, rhs: FieldElement) -> FieldElement
fn mul(self, rhs: FieldElement) -> FieldElement
Performs the
*
operation. Read moresource§impl PartialEq for FieldElement
impl PartialEq for FieldElement
source§fn eq(&self, other: &FieldElement) -> bool
fn eq(&self, other: &FieldElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sub for FieldElement
impl Sub for FieldElement
impl Copy for FieldElement
impl StructuralPartialEq 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