Expand description
Defines a multiplicative identity element for Self
.
a * 1 = a ∀ a ∈ Self
1 * a = a ∀ a ∈ Self
Returns the multiplicative identity element of Self
, 1
.
This function should return the same result at all times regardless of
external mutable state, for example values stored in TLS or in
static mut
s.
Sets self
to the multiplicative identity element of Self
, 1
.
Returns true
if self
is equal to the multiplicative identity.
For performance reasons, it’s best to implement this manually.
After a semver bump, this method will be required, and the
where Self: PartialEq
bound will be removed.
impl<P> One for Fp2<P> where
P: Fp2Parameters,
impl<P> One for Fp384<P> where
P: Fp384Parameters,
impl<P> One for Fp12<P> where
P: Fp12Parameters,
impl<P> One for Fp256<P> where
P: Fp256Parameters,
impl<P> One for Fp6<P> where
P: Fp6Parameters,
impl<E> One for Field<E> where
E: Environment,
Returns the 1
element of the field.
Returns true
if the element is one.
impl<E> One for Scalar<E> where
E: Environment,
Returns the 1
element of the scalar.
Returns true
if the element is one.
impl<E, I> One for Integer<E, I> where
E: Environment,
I: IntegerType,
Returns the 1
element of the integer.
Returns true
if the element is one.