pub trait Consolidate {
// Required methods
fn len(&self) -> usize;
fn clear(&mut self);
fn consolidate_into(&mut self, target: &mut Self);
}Expand description
A container that can sort and consolidate its contents internally.
The container knows its own layout — how to sort its elements, how to
compare adjacent entries, and how to merge diffs. The caller provides
a target container to receive the consolidated output, allowing
reuse of allocations across calls.
After the call, target contains the sorted, consolidated data and
self may be empty or in an unspecified state (implementations should
document this).
Required Methods§
Sourcefn consolidate_into(&mut self, target: &mut Self)
fn consolidate_into(&mut self, target: &mut Self)
Sort and consolidate self into target.
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.