Trait Semiring

Source
pub trait Semiring {
    // Required methods
    fn zero() -> Self;
    fn one() -> Self;
    fn add(self, b: Self) -> Self;
    fn mul(self, b: Self) -> Self;
}
Expand description

半環

Required Methods§

Source

fn zero() -> Self

加法の単位元

Source

fn one() -> Self

乗法の単位元

Source

fn add(self, b: Self) -> Self

可換で結合的な二項演算

Source

fn mul(self, b: Self) -> Self

結合的な二項演算

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§