Struct p256::P256FieldElement
source · pub struct P256FieldElement { /* private fields */ }
Trait Implementations§
source§impl Add for P256FieldElement
impl Add for P256FieldElement
source§impl AsRef<[u8]> for P256FieldElement
impl AsRef<[u8]> for P256FieldElement
source§impl Clone for P256FieldElement
impl Clone for P256FieldElement
source§fn clone(&self) -> P256FieldElement
fn clone(&self) -> P256FieldElement
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 P256FieldElement
impl Debug for P256FieldElement
source§impl Display for P256FieldElement
impl Display for P256FieldElement
source§impl Hash for P256FieldElement
impl Hash for P256FieldElement
source§impl Mul for P256FieldElement
impl Mul for P256FieldElement
source§impl NatMod<32> for P256FieldElement
impl NatMod<32> for P256FieldElement
const MODULUS: [u8; 32] = _
const MODULUS_STR: &'static str = "ffffffff00000001000000000000000000000000ffffffffffffffffffffffff"
const ZERO: [u8; 32] = _
fn new(value: [u8; 32]) -> Self
fn value(&self) -> &[u8] ⓘ
§fn fsub(self, rhs: Self) -> Selfwhere
Self: Sized,
fn fsub(self, rhs: Self) -> Selfwhere
Self: Sized,
Sub self with
rhs
and return the result self - rhs % MODULUS
.§fn fadd(self, rhs: Self) -> Selfwhere
Self: Sized,
fn fadd(self, rhs: Self) -> Selfwhere
Self: Sized,
Add self with
rhs
and return the result self + rhs % MODULUS
.§fn fmul(self, rhs: Self) -> Selfwhere
Self: Sized,
fn fmul(self, rhs: Self) -> Selfwhere
Self: Sized,
Multiply self with
rhs
and return the result self * rhs % MODULUS
.fn inv0(self) -> Selfwhere
Self: Sized,
fn bit(&self, bit: u128) -> bool
fn neg(self) -> Selfwhere
Self: Sized,
§fn from_le_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
fn from_le_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
Create a new [
#ident
] from a little endian byte slice. Read more§fn from_be_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
fn from_be_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
Create a new [
#ident
] from a little endian byte slice. Read morefn to_le_bytes(self) -> [u8; LEN]where
Self: Sized,
fn to_be_bytes(self) -> [u8; LEN]where
Self: Sized,
fn pad(bytes: &[u8]) -> [u8; LEN]
fn from_bigint(x: BigUint) -> Selfwhere
Self: Sized,
source§impl Neg for P256FieldElement
impl Neg for P256FieldElement
source§impl Ord for P256FieldElement
impl Ord for P256FieldElement
source§fn cmp(&self, other: &P256FieldElement) -> Ordering
fn cmp(&self, other: &P256FieldElement) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for P256FieldElement
impl PartialEq for P256FieldElement
source§fn eq(&self, other: &P256FieldElement) -> bool
fn eq(&self, other: &P256FieldElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for P256FieldElement
impl PartialOrd for P256FieldElement
source§fn partial_cmp(&self, other: &P256FieldElement) -> Option<Ordering>
fn partial_cmp(&self, other: &P256FieldElement) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Sub for P256FieldElement
impl Sub for P256FieldElement
impl Copy for P256FieldElement
impl Eq for P256FieldElement
impl StructuralPartialEq for P256FieldElement
Auto Trait Implementations§
impl Freeze for P256FieldElement
impl RefUnwindSafe for P256FieldElement
impl Send for P256FieldElement
impl Sync for P256FieldElement
impl Unpin for P256FieldElement
impl UnwindSafe for P256FieldElement
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