num::traits

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: f32 = 0f32

Source§

impl ConstZero for f64

Source§

const ZERO: f64 = 0f64

Source§

impl ConstZero for i8

Source§

const ZERO: i8 = 0i8

Source§

impl ConstZero for i16

Source§

const ZERO: i16 = 0i16

Source§

impl ConstZero for i32

Source§

const ZERO: i32 = 0i32

Source§

impl ConstZero for i64

Source§

const ZERO: i64 = 0i64

Source§

impl ConstZero for i128

Source§

const ZERO: i128 = 0i128

Source§

impl ConstZero for isize

Source§

const ZERO: isize = 0isize

Source§

impl ConstZero for u8

Source§

const ZERO: u8 = 0u8

Source§

impl ConstZero for u16

Source§

const ZERO: u16 = 0u16

Source§

impl ConstZero for u32

Source§

const ZERO: u32 = 0u32

Source§

impl ConstZero for u64

Source§

const ZERO: u64 = 0u64

Source§

impl ConstZero for u128

Source§

const ZERO: u128 = 0u128

Source§

impl ConstZero for usize

Source§

const ZERO: usize = 0usize

Source§

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

Source§

const ZERO: Wrapping<T> = _

Implementors§