Trait Zero

Source
pub trait Zero {
    // Required methods
    fn zero() -> Self;
    fn is_zero(x: &Self) -> Choice;
}
Expand description

Type that has zero value (additive identity)

Required Methods§

Source

fn zero() -> Self

Constructs zero value of Self

Source

fn is_zero(x: &Self) -> Choice

Checks (in constant-time) if x is zero

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Zero for Point

Source§

impl Zero for Scalar

Source§

impl<E> Zero for RustCryptoPoint<E>
where E: CurveArithmetic,

Source§

impl<E> Zero for RustCryptoScalar<E>
where E: CurveArithmetic,

Implementors§

Source§

impl<E: Curve> Zero for generic_ec::Point<E>

Source§

impl<E: Curve> Zero for generic_ec::Scalar<E>