Trait Zero

Source
pub trait Zero {
    // Required methods
    fn zero() -> Self;
    fn is_zero(&self) -> bool;
}
Expand description

A trait for values that can be zero.

Required Methods§

Source

fn zero() -> Self

Returns the zero value.

Source

fn is_zero(&self) -> bool

Returns whether the value 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.

Implementors§