Trait Monoid

Source
pub trait Monoid: Debug {
    type Target: Debug + Clone;

    // Required methods
    fn id_element() -> Self::Target;
    fn binary_operation(a: &Self::Target, b: &Self::Target) -> Self::Target;
}
Expand description

モノイド

Required Associated Types§

Source

type Target: Debug + Clone

モノイドの要素

Required Methods§

Source

fn id_element() -> Self::Target

単位元

Source

fn binary_operation(a: &Self::Target, b: &Self::Target) -> Self::Target

二項演算

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§