Trait IsMergeable

Source
pub trait IsMergeable {
    // Required methods
    fn consume(&mut self, other: Self);
    fn combine(&self, other: &Self) -> Self;
}
Expand description

IsMergeable trait used for types which can be merged with their own type

Required Methods§

Source

fn consume(&mut self, other: Self)

Should merge other into this

Source

fn combine(&self, other: &Self) -> Self

Should return a combination of this and other

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§