Trait Merge
pub trait Merge: Default {
// Required methods
fn merge(&mut self, other: Self);
fn is_empty(&self) -> bool;
// Provided method
fn take(&mut self) -> Option<Self> { ... }
}
Expand description
Trait that makes an object mergeable.
Required Methods§
fn merge(&mut self, other: Self)
fn merge(&mut self, other: Self)
Merge another object of the same type onto self
.
Provided Methods§
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.