pub trait Mergeable {
// Required methods
fn merge(&mut self, other: Self);
fn merge_weak(&mut self, other: Self);
}Expand description
Allow merging two objects of the same type into one.
Required Methods§
Sourcefn merge_weak(&mut self, other: Self)
fn merge_weak(&mut self, other: Self)
Merge other into self, with self taking precedence.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T> Mergeable for Vec<T>
impl<T> Mergeable for Vec<T>
Source§fn merge(&mut self, other: Self)
fn merge(&mut self, other: Self)
Append other to self, in this order.
Ordering is influenced by the local desire to have prompts with higher precedence later.
Source§fn merge_weak(&mut self, other: Self)
fn merge_weak(&mut self, other: Self)
Append self to other, in this order, putting the result into self.
Ordering is influenced by the local desire to have prompts with higher precedence later.