num_traits::identities

Trait ConstZero

Source
pub trait ConstZero: Zero {
    const ZERO: Self;
}
Expand description

Defines an associated constant representing the additive identity element for Self.

Required Associated Constants§

Source

const ZERO: Self

The additive identity element of Self, 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.

Implementations on Foreign Types§

Source§

impl ConstZero for f32

Source§

const ZERO: Self = 0f32

Source§

impl ConstZero for f64

Source§

const ZERO: Self = 0f64

Source§

impl ConstZero for i8

Source§

const ZERO: Self = 0i8

Source§

impl ConstZero for i16

Source§

const ZERO: Self = 0i16

Source§

impl ConstZero for i32

Source§

const ZERO: Self = 0i32

Source§

impl ConstZero for i64

Source§

const ZERO: Self = 0i64

Source§

impl ConstZero for i128

Source§

const ZERO: Self = 0i128

Source§

impl ConstZero for isize

Source§

const ZERO: Self = 0isize

Source§

impl ConstZero for u8

Source§

const ZERO: Self = 0u8

Source§

impl ConstZero for u16

Source§

const ZERO: Self = 0u16

Source§

impl ConstZero for u32

Source§

const ZERO: Self = 0u32

Source§

impl ConstZero for u64

Source§

const ZERO: Self = 0u64

Source§

impl ConstZero for u128

Source§

const ZERO: Self = 0u128

Source§

impl ConstZero for usize

Source§

const ZERO: Self = 0usize

Source§

impl<T: ConstZero> ConstZero for Wrapping<T>
where Wrapping<T>: Add<Output = Wrapping<T>>,

Source§

const ZERO: Self

Implementors§