Skip to main content

ConstZero

Trait ConstZero 

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

Helper trait to identify the zero value of a type at compile time.

use uom::ConstZero;

const ORIGIN: (Length, Length, Length) = (Length::ZERO, Length::ZERO, Length::ZERO);

Required Associated Constants§

Source

const ZERO: Self

Constant representing the zero value.

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 = 0.0

Source§

impl ConstZero for f64

Source§

const ZERO: Self = 0.0

Source§

impl ConstZero for i32

Source§

const ZERO: Self = 0

Source§

impl ConstZero for i64

Source§

const ZERO: Self = 0

Source§

impl ConstZero for isize

Source§

const ZERO: Self = 0

Source§

impl ConstZero for u32

Source§

const ZERO: Self = 0

Source§

impl ConstZero for u64

Source§

const ZERO: Self = 0

Source§

impl ConstZero for usize

Source§

const ZERO: Self = 0

Implementors§

Source§

impl<D, U, V> ConstZero for Quantity<D, U, V>
where D: Dimension + ?Sized, U: Units<V> + ?Sized, V: Num + Conversion<V> + ConstZero,

Source§

const ZERO: Self