pub trait Merge {
// Required method
fn merge(&self, other: &Self) -> Option<Self>
where Self: Sized;
// Provided methods
fn merge_recursive(items: impl IntoIterator<Item = Self>) -> Vec<Self>
where Self: Sized { ... }
fn second_pass_merge(items: impl IntoIterator<Item = Self>) -> Vec<Self>
where Self: Sized { ... }
}
Required Methods§
Provided Methods§
sourcefn merge_recursive(items: impl IntoIterator<Item = Self>) -> Vec<Self>where
Self: Sized,
fn merge_recursive(items: impl IntoIterator<Item = Self>) -> Vec<Self>where Self: Sized,
Merge all items until the size don’t change
sourcefn second_pass_merge(items: impl IntoIterator<Item = Self>) -> Vec<Self>where
Self: Sized,
fn second_pass_merge(items: impl IntoIterator<Item = Self>) -> Vec<Self>where Self: Sized,
Iterate through each items in the group and merge that items that can be merged