Skip to main content

Zero

Trait Zero 

pub trait Zero: Sized + ConstantTimeEq {
    const ZERO: Self;

    // Provided method
    fn is_zero(&self) -> Choice { ... }
}
Expand description

Zero values.

Required Associated Constants§

const ZERO: Self

The value 0.

Provided Methods§

fn is_zero(&self) -> Choice

Determine if this value is equal to zero.

§Returns

If zero, returns Choice(1). Otherwise, returns Choice(0).

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.

Implementors§

§

impl Zero for Limb

§

const ZERO: Limb = Self::ZERO

§

impl<MOD, const LIMBS: usize> Zero for Residue<MOD, LIMBS>
where MOD: ResidueParams<LIMBS>,

§

const ZERO: Residue<MOD, LIMBS> = Self::ZERO

§

impl<T> Zero for Wrapping<T>
where T: Zero,

§

const ZERO: Wrapping<T>

§

impl<const LIMBS: usize> Zero for Uint<LIMBS>

§

const ZERO: Uint<LIMBS> = Self::ZERO