Skip to main content

Mergeable

Trait Mergeable 

Source
pub trait Mergeable {
    type MergeStrategy;

    // Required method
    fn merge(strategy: &Self::MergeStrategy, a: Self, b: Self) -> Self;
}
Expand description

Allows merging two values according to a strategy.

Required Associated Types§

Required Methods§

Source

fn merge(strategy: &Self::MergeStrategy, a: Self, b: Self) -> Self

Merge two values. a is the “accumulated/existing” value, b is the “incoming” one.

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§