Struct bellperson::bls::Fq[][src]

pub struct Fq(_);

Trait Implementations

impl BaseFromRO for Fq[src]

type BaseLength = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

pub fn from_okm(
    okm: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>
) -> Fq
[src]

impl Clone for Fq[src]

pub fn clone(&self) -> Fq[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 Debug for Fq[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Fq[src]

pub fn deserialize<D>(d: D) -> Result<Fq, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Display for Fq[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Field for Fq[src]

pub fn random<R>(rng: &mut R) -> Fq where
    R: RngCore
[src]

Computes a uniformly random element using rejection sampling.

pub fn zero() -> Fq[src]

Returns the zero element of the field, the additive identity.

pub fn one() -> Fq[src]

Returns the one element of the field, the multiplicative identity.

pub fn is_zero(&self) -> bool[src]

Returns true iff this element is zero.

pub fn add_assign(&mut self, other: &Fq)[src]

Adds another element to this element.

pub fn double(&mut self)[src]

Doubles this element.

pub fn sub_assign(&mut self, other: &Fq)[src]

Subtracts another element from this element.

pub fn negate(&mut self)[src]

Negates this element.

pub fn inverse(&self) -> Option<Fq>[src]

Computes the multiplicative inverse of this element, if nonzero.

pub fn frobenius_map(&mut self, usize)[src]

Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more

pub fn mul_assign(&mut self, other: &Fq)[src]

Multiplies another element by this element.

pub fn square(&mut self)[src]

Squares this element.

fn pow<S>(&self, exp: S) -> Self where
    S: AsRef<[u64]>, 
[src]

Exponentiates this element by a number represented with u64 limbs, least significant digit first. Read more

impl From<Fq> for FqRepr[src]

pub fn from(e: Fq) -> FqRepr[src]

Performs the conversion.

impl Ord for Fq[src]

Elements are ordered lexicographically.

pub fn cmp(&self, other: &Fq) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<Fq> for Fq[src]

pub fn eq(&self, other: &Fq) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialOrd<Fq> for Fq[src]

pub fn partial_cmp(&self, other: &Fq) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
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

#[must_use]
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

#[must_use]
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

#[must_use]
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 PrimeField for Fq[src]

type Repr = FqRepr

The prime field can be converted back and forth into this biginteger representation. Read more

pub fn from_repr(r: FqRepr) -> Result<Fq, PrimeFieldDecodingError>[src]

Convert this prime field element into a biginteger representation.

pub fn into_repr(&self) -> FqRepr[src]

Convert a biginteger representation into a prime field element, if the number is an element of the field. Read more

pub fn char() -> FqRepr[src]

Returns the field characteristic; the modulus.

pub const NUM_BITS: u32[src]

How many bits are needed to represent an element of this field.

pub const CAPACITY: u32[src]

How many bits of information can be reliably stored in the field element.

pub fn multiplicative_generator() -> Fq[src]

Returns the multiplicative generator of char() - 1 order. This element must also be quadratic nonresidue. Read more

pub const S: u32[src]

2^s * t = char() - 1 with t odd.

pub fn root_of_unity() -> Fq[src]

Returns the 2^s root of unity computed by exponentiating the multiplicative_generator() by t. Read more

pub fn from_random_bytes(bytes: &[u8]) -> Option<Fq>[src]

fn from_str(s: &str) -> Option<Self>[src]

Interpret a string of numbers as a (congruent) prime field element. Does not accept unnecessary leading zeroes or a blank string. Read more

impl Serialize for Fq[src]

pub fn serialize<S>(
    &self,
    s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Signum0 for Fq[src]

pub fn sgn0(&self) -> Sgn0Result[src]

Returns either Negative or NonNegative.

fn negate_if(&mut self, sgn: Sgn0Result)[src]

Negate if the argument is Negative.

impl SqrtField for Fq[src]

pub fn legendre(&self) -> LegendreSymbol[src]

Returns the Legendre symbol of the field element.

pub fn sqrt(&self) -> Option<Fq>[src]

Returns the square root of the field element, if it is quadratic residue. Read more

impl Copy for Fq[src]

impl Eq for Fq[src]

Auto Trait Implementations

impl RefUnwindSafe for Fq

impl Send for Fq

impl Sync for Fq

impl Unpin for Fq

impl UnwindSafe for Fq

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> FromRO for T where
    T: BaseFromRO
[src]

type Length = <T as BaseFromRO>::BaseLength

pub fn from_ro(okm: &GenericArray<u8, <T as FromRO>::Length>) -> T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]