pub trait AppendRle<T: MergableSpan> {
// Required methods
fn push_rle(&mut self, item: T) -> bool;
fn push_reversed_rle(&mut self, item: T) -> bool;
}Required Methods§
Sourcefn push_rle(&mut self, item: T) -> bool
fn push_rle(&mut self, item: T) -> bool
Push a new item to this list-like object. If the passed item can be merged into the last item in the list, do so instead of inserting a new item.
Returns true if the item was merged into the previous last item, false if it was inserted.
Sourcefn push_reversed_rle(&mut self, item: T) -> bool
fn push_reversed_rle(&mut self, item: T) -> bool
Push a new item to the end of this list-like object. If the passed object can be merged to the front of the previously last item, do so. This is useful for appending to a list which is sorted in reverse.