Skip to main content

One

Trait One 

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

Trait to define a one in a semiring.

Required Methods§

Source

fn one(&self) -> T

Returns the one element of the semiring. Identity for the multiplication operation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl One<U32WithInfinity> for Cost

Implementation of Identity for multiplication.

Source§

impl One<bool> for BinaryTrust

Implementation of Identity for multiplication.

Source§

impl One<f64> for ConfidenceScore

Implementation of Identity for multiplication.

Source§

impl One<f64> for FuzzyLogic

Implementation of Identity for multiplication.

Source§

impl One<u32> for Multiplicity

Implementation of Identity for multiplication.