Skip to main content

Zero

Trait Zero 

Source
pub trait Zero<T> {
    // Required method
    fn zero(&self) -> T;
}
Expand description

Trait to check if semiring contains a zero.

Required Methods§

Source

fn zero(&self) -> T

Returns the zero element of the semiring. Identify for the Addition operation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Zero<U32WithInfinity> for Cost

Implementation of Identity for addition.

Source§

impl Zero<bool> for BinaryTrust

Implementation of Identity for addition.

Source§

impl Zero<f64> for ConfidenceScore

Implementation of Identity for addition.

Source§

impl Zero<f64> for FuzzyLogic

Implementation of Identity for addition.

Source§

impl Zero<u32> for Multiplicity

Implementation of Identity for addition.