Struct NonZero

Source
pub struct NonZero<T>(/* private fields */);
Expand description

Non zero Point or Scalar

Implementations§

Source§

impl<T> NonZero<T>

Source

pub fn into_inner(self) -> T

Returns wrapped value

Source§

impl<E: Curve> NonZero<Point<E>>

Source

pub fn from_point(point: Point<E>) -> Option<Self>

Constructs non-zero point

Returns None if point is zero

Source

pub fn ct_from_point(point: Point<E>) -> CtOption<Self>

Constructs non-zero point (constant time)

Returns None if point is zero

Source§

impl<E: Curve> NonZero<Scalar<E>>

Source

pub fn random<R: RngCore>(rng: &mut R) -> Self

Generates random non-zero scalar

Algorithm is based on rejection sampling: we sample a scalar, if it’s zero try again. It may be considered constant-time as zero scalar appears with $2^{-256}$ probability which is considered to be negligible.

§Panics

Panics if randomness source returned 100 zero scalars in a row. It happens with $2^{-25600}$ probability, which practically means that randomness source is broken.

Source

pub fn from_hash<D: Digest>(data: &impl Digestable) -> Self

Available on crate feature hash-to-scalar only.

Hashes the input and outputs scalar

Input can be any structured data that implements Digestable trait (see udigest crate).

§How it works

It works by instantiating HashRng CSPRNG seeded from provided data. Then it’s used to derive the scalar.

§Security considerations

It’s not constant time. It doesn’t follow any existing standards for hash to scalar primitive.

§Example
use generic_ec::{Scalar, NonZero, curves::Secp256k1};
use sha2::Sha256;

#[derive(udigest::Digestable)]
struct Data<'a> {
    nonce: &'a [u8],
    param_a: &'a str,
    param_b: u128,
    // ...
}

let scalar = NonZero::<Scalar<Secp256k1>>::from_hash::<Sha256>(&Data {
    nonce: b"some data",
    param_a: "some other data",
    param_b: 12345,
    // ...
});
Source

pub fn one() -> Self

Constructs $S = 1$

Source

pub fn from_scalar(scalar: Scalar<E>) -> Option<Self>

Constructs non-zero scalar

Returns None if scalar is zero

Source

pub fn ct_from_scalar(scalar: Scalar<E>) -> CtOption<Self>

Constructs non-zero scalar (constant time)

Returns None if scalar is zero

Source

pub fn invert(&self) -> NonZero<Scalar<E>>

Returns scalar inverse $S^{-1}$

Similar to Scalar::invert, but this function is always defined as inverse is defined for all non-zero scalars

Source

pub fn into_secret(self) -> NonZero<SecretScalar<E>>

Upgrades the non-zero scalar into non-zero SecretScalar

Source§

impl<E: Curve> NonZero<SecretScalar<E>>

Source

pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self

Generates random non-zero scalar

Algorithm is based on rejection sampling: we sample a scalar, if it’s zero try again. It may be considered constant-time as zero scalar appears with $2^{-256}$ probability which is considered to be negligible.

§Panics

Panics if randomness source returned 100 zero scalars in a row. It happens with $2^{-25600}$ probability, which practically means that randomness source is broken.

Source

pub fn one() -> Self

Constructs $S = 1$

Source

pub fn from_secret_scalar(scalar: SecretScalar<E>) -> Option<Self>

Constructs non-zero scalar

Returns None if scalar is zero

Source

pub fn ct_from_secret_scalar(secret_scalar: SecretScalar<E>) -> CtOption<Self>

Constructs non-zero scalar (constant time)

Returns None if scalar is zero

Source

pub fn invert(&self) -> NonZero<SecretScalar<E>>

Returns scalar inverse $S^{-1}$

Similar to SecretScalar::invert, but this function is always defined as inverse is defined for all non-zero scalars

Trait Implementations§

Source§

impl<E: Curve> Add<&NonZero<Point<E>>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Point<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Point<E>>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Point<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Point<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Point<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Point<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Point<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Scalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Scalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Scalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Scalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&SecretScalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&SecretScalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&SecretScalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&SecretScalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Point<E>>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Point<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Point<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Point<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Point<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Point<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Point<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Scalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Scalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Scalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Scalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<SecretScalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<SecretScalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<SecretScalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add<SecretScalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> Add for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E: Curve> AddAssign<&NonZero<Point<E>>> for Point<E>

Source§

fn add_assign(&mut self, rhs: &NonZero<Point<E>>)

Performs the += operation. Read more
Source§

impl<E: Curve> AddAssign<&NonZero<Scalar<E>>> for Scalar<E>

Source§

fn add_assign(&mut self, rhs: &NonZero<Scalar<E>>)

Performs the += operation. Read more
Source§

impl<E: Curve> AddAssign<&NonZero<SecretScalar<E>>> for Scalar<E>

Source§

fn add_assign(&mut self, rhs: &NonZero<SecretScalar<E>>)

Performs the += operation. Read more
Source§

impl<E: Curve> AddAssign<NonZero<Point<E>>> for Point<E>

Source§

fn add_assign(&mut self, rhs: NonZero<Point<E>>)

Performs the += operation. Read more
Source§

impl<E: Curve> AddAssign<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn add_assign(&mut self, rhs: NonZero<Scalar<E>>)

Performs the += operation. Read more
Source§

impl<E: Curve> AddAssign<NonZero<SecretScalar<E>>> for Scalar<E>

Source§

fn add_assign(&mut self, rhs: NonZero<SecretScalar<E>>)

Performs the += operation. Read more
Source§

impl<E: Curve> AlwaysHasAffineX<E> for NonZero<Point<E>>
where Point<E>: HasAffineX<E>,

Source§

fn x(&self) -> Coordinate<E>

Retrieves affine $x$ coordinate of a point
Source§

impl<E: Curve> AlwaysHasAffineXY<E> for NonZero<Point<E>>
where Point<E>: HasAffineXY<E>,

Source§

fn from_coords(coords: &Coordinates<E>) -> Option<Self>

Constructs a point from affine coordinates Read more
Source§

impl<E: Curve> AlwaysHasAffineY<E> for NonZero<Point<E>>
where Point<E>: HasAffineY<E>,

Source§

fn y(&self) -> Coordinate<E>

Retrieves affine $y$ coordinate
Source§

impl<E: Curve> AsRef<Scalar<E>> for NonZero<SecretScalar<E>>

Source§

fn as_ref(&self) -> &Scalar<E>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> AsRef<T> for NonZero<T>

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Clone> Clone for NonZero<T>

Source§

fn clone(&self) -> NonZero<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: ConstantTimeEq> ConstantTimeEq for NonZero<T>

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
Source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
Source§

impl<T: Debug> Debug for NonZero<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Deref for NonZero<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'de, T> Deserialize<'de> for NonZero<T>
where NonZero<T>: TryFrom<T>, <NonZero<T> as TryFrom<T>>::Error: Display, T: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'de, T> DeserializeAs<'de, NonZero<T>> for Compact
where Compact: DeserializeAs<'de, T>, NonZero<T>: TryFrom<T>, <NonZero<T> as TryFrom<T>>::Error: Display,

Available on crate feature serde only.
Source§

fn deserialize_as<D>(deserializer: D) -> Result<NonZero<T>, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Source§

impl<T> Digestable for NonZero<T>
where T: Digestable,

Source§

fn unambiguously_encode<B>(&self, encoder: EncodeValue<'_, B>)
where B: Buffer,

Unambiguously encodes the value
Source§

impl<E: Curve> From<Generator<E>> for NonZero<Point<E>>

Source§

fn from(g: Generator<E>) -> Self

Converts to this type from the input type.
Source§

impl<E: Curve> From<NonZero<Point<E>>> for Point<E>

Source§

fn from(point: NonZero<Point<E>>) -> Self

Converts to this type from the input type.
Source§

impl<E: Curve> From<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn from(scalar: NonZero<Scalar<E>>) -> Self

Converts to this type from the input type.
Source§

impl<E: Curve> From<NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

fn from(secret_scalar: NonZero<SecretScalar<E>>) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash> Hash for NonZero<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> IsZero for NonZero<T>

Source§

fn is_zero(&self) -> bool

Returns false as NonZero<T> cannot be zero

Source§

impl<E: Curve> Mul<&Generator<E>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Generator<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Generator<E>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Generator<E>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &Scalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &SecretScalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for Scalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for SecretScalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for &Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for &NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&NonZero<SecretScalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Point<E>> for &NonZero<Scalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Point<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Point<E>> for NonZero<Scalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Point<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Scalar<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Scalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Scalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Scalar<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Scalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&Scalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&SecretScalar<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&SecretScalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&SecretScalar<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<&SecretScalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Generator<E>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Generator<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Generator<E>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Generator<E>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Generator<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &Scalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &SecretScalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for Scalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Point<E>>> for SecretScalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for &Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for &NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for Generator<E>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<NonZero<SecretScalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Point<E>> for &NonZero<Scalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Point<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Point<E>> for NonZero<Scalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Point<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Point<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Scalar<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Scalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Scalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Scalar<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Scalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<Scalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<SecretScalar<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<SecretScalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<SecretScalar<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul<SecretScalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul for NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> Mul for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<Scalar<E>>> for NonZero<Point<E>>

Source§

fn mul_assign(&mut self, rhs: &NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

Source§

fn mul_assign(&mut self, rhs: &NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<Scalar<E>>> for Point<E>

Source§

fn mul_assign(&mut self, rhs: &NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<Scalar<E>>> for Scalar<E>

Source§

fn mul_assign(&mut self, rhs: &NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<SecretScalar<E>>> for NonZero<Point<E>>

Source§

fn mul_assign(&mut self, rhs: &NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

fn mul_assign(&mut self, rhs: &NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<SecretScalar<E>>> for Point<E>

Source§

fn mul_assign(&mut self, rhs: &NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<&NonZero<SecretScalar<E>>> for Scalar<E>

Source§

fn mul_assign(&mut self, rhs: &NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<Scalar<E>>> for NonZero<Point<E>>

Source§

fn mul_assign(&mut self, rhs: NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<Scalar<E>>> for Point<E>

Source§

fn mul_assign(&mut self, rhs: NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn mul_assign(&mut self, rhs: NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<SecretScalar<E>>> for NonZero<Point<E>>

Source§

fn mul_assign(&mut self, rhs: NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

fn mul_assign(&mut self, rhs: NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<SecretScalar<E>>> for Point<E>

Source§

fn mul_assign(&mut self, rhs: NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign<NonZero<SecretScalar<E>>> for Scalar<E>

Source§

fn mul_assign(&mut self, rhs: NonZero<SecretScalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> MulAssign for NonZero<Scalar<E>>

Source§

fn mul_assign(&mut self, rhs: NonZero<Scalar<E>>)

Performs the *= operation. Read more
Source§

impl<E: Curve> Neg for &NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<E: Curve> Neg for &NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<E: Curve> Neg for &NonZero<SecretScalar<E>>

Source§

type Output = NonZero<SecretScalar<E>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<E: Curve> Neg for NonZero<Point<E>>

Source§

type Output = NonZero<Point<E>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<E: Curve> Neg for NonZero<Scalar<E>>

Source§

type Output = NonZero<Scalar<E>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<E: Curve> Neg for NonZero<SecretScalar<E>>

Source§

type Output = NonZero<SecretScalar<E>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<E: Curve> One for NonZero<Scalar<E>>

Source§

fn one() -> Self

Constructs one value of Self
Source§

fn is_one(x: &Self) -> Choice

Checks (in constant-time) if x is one
Source§

impl<T: Ord> Ord for NonZero<T>

Source§

fn cmp(&self, other: &NonZero<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<E: Curve> PartialEq<NonZero<Point<E>>> for Point<E>

Source§

fn eq(&self, other: &NonZero<Point<E>>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<E: Curve> PartialEq<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn eq(&self, other: &NonZero<Scalar<E>>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialEq<T> for NonZero<T>
where T: PartialEq,

Source§

fn eq(&self, other: &T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialEq> PartialEq for NonZero<T>

Source§

fn eq(&self, other: &NonZero<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<E: Curve> PartialOrd<NonZero<Point<E>>> for Point<E>

Source§

fn partial_cmp(&self, other: &NonZero<Point<E>>) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<E: Curve> PartialOrd<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn partial_cmp(&self, other: &NonZero<Scalar<E>>) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> PartialOrd<T> for NonZero<T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, other: &T) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T: PartialOrd> PartialOrd for NonZero<T>

Source§

fn partial_cmp(&self, other: &NonZero<T>) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'s, E: Curve> Product<&'s NonZero<Scalar<E>>> for NonZero<Scalar<E>>

Source§

fn product<I: Iterator<Item = &'s NonZero<Scalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<'s, E: Curve> Product<&'s NonZero<SecretScalar<E>>> for NonZero<SecretScalar<E>>

Source§

fn product<I: Iterator<Item = &'s NonZero<SecretScalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<E: Curve> Product for NonZero<Scalar<E>>

Source§

fn product<I: Iterator<Item = NonZero<Scalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<E: Curve> Product for NonZero<SecretScalar<E>>

Source§

fn product<I: Iterator<Item = NonZero<SecretScalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<E: Curve> Samplable for NonZero<Scalar<E>>

Source§

fn random<R: RngCore>(rng: &mut R) -> Self

Uniformely samples a random value of Self
Source§

impl<E: Curve> Samplable for NonZero<SecretScalar<E>>

Source§

fn random<R: RngCore>(rng: &mut R) -> Self

Uniformely samples a random value of Self
Source§

impl<T> Serialize for NonZero<T>
where T: From<NonZero<T>> + Clone + Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T> SerializeAs<NonZero<T>> for Compact
where Compact: SerializeAs<T>,

Available on crate feature serde only.
Source§

fn serialize_as<S>( source: &NonZero<T>, serializer: S, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Point<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Point<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Point<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Point<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Scalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Scalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Scalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Scalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&SecretScalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&SecretScalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&SecretScalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&SecretScalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Point<E>>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Point<E>>> for &Point<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Point<E>>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for &Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for &SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for Scalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Point<E>> for &NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Point<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Point<E>> for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Point<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Scalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Scalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Scalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Scalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<SecretScalar<E>> for &NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<SecretScalar<E>> for &NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<SecretScalar<E>> for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<SecretScalar<E>> for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub for NonZero<Point<E>>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub for NonZero<Scalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> Sub for NonZero<SecretScalar<E>>

Source§

type Output = Scalar<E>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NonZero<SecretScalar<E>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<E: Curve> SubAssign<&NonZero<Point<E>>> for Point<E>

Source§

fn sub_assign(&mut self, rhs: &NonZero<Point<E>>)

Performs the -= operation. Read more
Source§

impl<E: Curve> SubAssign<&NonZero<Scalar<E>>> for Scalar<E>

Source§

fn sub_assign(&mut self, rhs: &NonZero<Scalar<E>>)

Performs the -= operation. Read more
Source§

impl<E: Curve> SubAssign<&NonZero<SecretScalar<E>>> for Scalar<E>

Source§

fn sub_assign(&mut self, rhs: &NonZero<SecretScalar<E>>)

Performs the -= operation. Read more
Source§

impl<E: Curve> SubAssign<NonZero<Point<E>>> for Point<E>

Source§

fn sub_assign(&mut self, rhs: NonZero<Point<E>>)

Performs the -= operation. Read more
Source§

impl<E: Curve> SubAssign<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn sub_assign(&mut self, rhs: NonZero<Scalar<E>>)

Performs the -= operation. Read more
Source§

impl<E: Curve> SubAssign<NonZero<SecretScalar<E>>> for Scalar<E>

Source§

fn sub_assign(&mut self, rhs: NonZero<SecretScalar<E>>)

Performs the -= operation. Read more
Source§

impl<'s, E: Curve> Sum<&'s NonZero<Point<E>>> for Point<E>

Source§

fn sum<I: Iterator<Item = &'s NonZero<Point<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'s, E: Curve> Sum<&'s NonZero<Scalar<E>>> for Scalar<E>

Source§

fn sum<I: Iterator<Item = &'s NonZero<Scalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'s, E: Curve> Sum<&'s NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

fn sum<I: Iterator<Item = &'s NonZero<SecretScalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<E: Curve> Sum<NonZero<Point<E>>> for Point<E>

Source§

fn sum<I: Iterator<Item = NonZero<Point<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<E: Curve> Sum<NonZero<Scalar<E>>> for Scalar<E>

Source§

fn sum<I: Iterator<Item = NonZero<Scalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<E: Curve> Sum<NonZero<SecretScalar<E>>> for SecretScalar<E>

Source§

fn sum<I: Iterator<Item = NonZero<SecretScalar<E>>>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<E: Curve> TryFrom<Point<E>> for NonZero<Point<E>>

Source§

type Error = ZeroPoint

The type returned in the event of a conversion error.
Source§

fn try_from(point: Point<E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<E: Curve> TryFrom<Scalar<E>> for NonZero<Scalar<E>>

Source§

type Error = ZeroScalar

The type returned in the event of a conversion error.
Source§

fn try_from(scalar: Scalar<E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<E: Curve> TryFrom<SecretScalar<E>> for NonZero<SecretScalar<E>>

Source§

type Error = ZeroScalar

The type returned in the event of a conversion error.
Source§

fn try_from(secret_scalar: SecretScalar<E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> Zeroize for NonZero<T>
where T: Zeroize,

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl<T: Copy> Copy for NonZero<T>

Source§

impl<T: Eq> Eq for NonZero<T>

Source§

impl<T> StructuralPartialEq for NonZero<T>

Auto Trait Implementations§

§

impl<T> Freeze for NonZero<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for NonZero<T>
where T: RefUnwindSafe,

§

impl<T> Send for NonZero<T>
where T: Send,

§

impl<T> Sync for NonZero<T>
where T: Sync,

§

impl<T> Unpin for NonZero<T>
where T: Unpin,

§

impl<T> UnwindSafe for NonZero<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,