Struct pairing::bls12_381::FrRepr
[−]
[src]
pub struct FrRepr(pub [u64; 4]);
Trait Implementations
impl Copy for FrRepr
[src]
impl Clone for FrRepr
[src]
fn clone(&self) -> FrRepr
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for FrRepr
[src]
fn eq(&self, __arg_0: &FrRepr) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &FrRepr) -> bool
[src]
This method tests for !=
.
impl Eq for FrRepr
[src]
impl Default for FrRepr
[src]
impl Debug for FrRepr
[src]
impl Rand for FrRepr
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
[src]
Generates a random instance of this type using the specified source of randomness. Read more
impl Display for FrRepr
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl AsRef<[u64]> for FrRepr
[src]
impl AsMut<[u64]> for FrRepr
[src]
impl From<u64> for FrRepr
[src]
impl Ord for FrRepr
[src]
fn cmp(&self, other: &FrRepr) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for FrRepr
[src]
fn partial_cmp(&self, other: &FrRepr) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PrimeFieldRepr for FrRepr
[src]
fn is_odd(&self) -> bool
[src]
Returns true iff this number is odd.
fn is_even(&self) -> bool
[src]
Returns true iff this number is even.
fn is_zero(&self) -> bool
[src]
Returns true iff this number is zero.
fn divn(&mut self, n: u32)
[src]
Performs a rightwise bitshift of this number by some amount.
fn div2(&mut self)
[src]
Performs a rightwise bitshift of this number, effectively dividing it by 2. Read more
fn mul2(&mut self)
[src]
Performs a leftwise bitshift of this number, effectively multiplying it by 2. Overflow is ignored. Read more
fn muln(&mut self, n: u32)
[src]
Performs a leftwise bitshift of this number by some amount.
fn num_bits(&self) -> u32
[src]
Compute the number of bits needed to encode this number. Always a multiple of 64. Read more
fn add_nocarry(&mut self, other: &FrRepr) -> bool
[src]
Add another representation to this one, returning the carry bit.
fn sub_noborrow(&mut self, other: &FrRepr) -> bool
[src]
Subtract another represetation from this one, returning the borrow bit.
fn write_be<W: Write>(&self, writer: W) -> Result<()>
[src]
Writes this PrimeFieldRepr
as a big endian integer. Always writes (num_bits
/ 8) bytes. Read more
fn read_be<R: Read>(&mut self, reader: R) -> Result<()>
[src]
Reads a big endian integer occupying (num_bits
/ 8) bytes into this representation. Read more