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§
Required Methods§
Sourcefn id_element() -> Self::Target
fn id_element() -> Self::Target
単位元
Sourcefn binary_operation(a: &Self::Target, b: &Self::Target) -> Self::Target
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.