Struct neptune::Scalar [−]
pub struct Scalar(_);
Trait Implementations
impl BaseFromRO for Fr
impl BaseFromRO for Fr
type BaseLength = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>
pub fn from_okm(
okm: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>>
) -> Fr
okm: &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>>
) -> Fr
impl<'de> Deserialize<'de> for Fr
impl<'de> Deserialize<'de> for Fr
pub fn deserialize<D>(d: D) -> Result<Fr, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(d: D) -> Result<Fr, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Field for Fr
impl Field for Fr
pub fn random<R>(rng: &mut R) -> Fr where
R: RngCore,
pub fn random<R>(rng: &mut R) -> Fr where
R: RngCore,
Computes a uniformly random element using rejection sampling.
pub fn add_assign(&mut self, other: &Fr)
pub fn add_assign(&mut self, other: &Fr)
Adds another element to this element.
pub fn double(&mut self)
pub fn double(&mut self)
Doubles this element.
pub fn sub_assign(&mut self, other: &Fr)
pub fn sub_assign(&mut self, other: &Fr)
Subtracts another element from this element.
pub fn negate(&mut self)
pub fn negate(&mut self)
Negates this element.
pub fn frobenius_map(&mut self, usize)
pub fn frobenius_map(&mut self, usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
pub fn mul_assign(&mut self, other: &Fr)
pub fn mul_assign(&mut self, other: &Fr)
Multiplies another element by this element.
pub fn square(&mut self)
pub fn square(&mut self)
Squares this element.
impl Ord for Fr
impl Ord for Fr
Elements are ordered lexicographically.
impl PartialOrd<Fr> for Fr
impl PartialOrd<Fr> for Fr
pub fn partial_cmp(&self, other: &Fr) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Fr) -> Option<Ordering>
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]
#[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]
#[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
impl PrimeField for Fr
impl PrimeField for Fr
type Repr = FrRepr
type Repr = FrRepr
The prime field can be converted back and forth into this biginteger representation. Read more
pub fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
pub fn from_repr(r: FrRepr) -> Result<Fr, PrimeFieldDecodingError>
Convert this prime field element into a biginteger representation.
pub fn into_repr(&self) -> FrRepr
pub fn into_repr(&self) -> FrRepr
Convert a biginteger representation into a prime field element, if the number is an element of the field. Read more
pub fn char() -> FrRepr
pub fn char() -> FrRepr
Returns the field characteristic; the modulus.
pub fn multiplicative_generator() -> Fr
pub fn multiplicative_generator() -> Fr
Returns the multiplicative generator of char()
- 1 order. This element
must also be quadratic nonresidue. Read more
pub fn root_of_unity() -> Fr
pub fn root_of_unity() -> Fr
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<Fr>
impl Serialize for Fr
impl Serialize for Fr
pub fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Fr
impl Eq for Fr
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> FromRO for T where
T: BaseFromRO,
impl<T> FromRO for T where
T: BaseFromRO,
type Length = <T as BaseFromRO>::BaseLength
pub fn from_ro(okm: &GenericArray<u8, <T as FromRO>::Length>) -> T
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
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]
T: for<'de> Deserialize<'de>,