Zero

Trait Zero 

Source
pub trait Zero
where Self: Sized,
{ // Required methods fn zero() -> Self; fn vartime_is_zero(&self) -> bool; }
Expand description

For an algebraic structure, this defines the additive identity.

Required Methods§

Source

fn zero() -> Self

The additive identity.

Source

fn vartime_is_zero(&self) -> bool

Whether or not this item 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 u8

Source§

fn zero() -> Self

Source§

fn vartime_is_zero(&self) -> bool

Source§

impl Zero for u16

Source§

fn zero() -> Self

Source§

fn vartime_is_zero(&self) -> bool

Source§

impl Zero for u32

Source§

fn zero() -> Self

Source§

fn vartime_is_zero(&self) -> bool

Source§

impl Zero for u64

Source§

fn zero() -> Self

Source§

fn vartime_is_zero(&self) -> bool

Source§

impl Zero for u128

Source§

fn zero() -> Self

Source§

fn vartime_is_zero(&self) -> bool

Implementors§

Source§

impl<T> Zero for Polynomial<T>
where T: Ring,

Source§

impl<T> Zero for ZInt<T>

Source§

impl<const N: usize, B: ArithmeticBackend<N>> Zero for Zq<N, B>