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

Base trait for types that can be wrapped in a NotZero.

Implementors must provide a singleton object that will be used to mark empty edges in a MatrixGraph.

Note that this trait is already implemented for the base numeric types.

Required Methods§

source

fn zero() -> Self

Return the singleton object which can be used as a sentinel value.

source

fn is_zero(&self) -> bool

Return true if self is equal to the sentinel value.

Implementations on Foreign Types§

source§

impl Zero for u32

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for u16

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for usize

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for i64

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for u8

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for f32

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for i8

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for i32

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for f64

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for u64

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for isize

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

source§

impl Zero for i16

source§

fn zero() -> Self

source§

fn is_zero(&self) -> bool

Implementors§