pub trait SortTextualOrder<T>
where T: PartialOrd,
{ // Required method fn textual_order(&mut self) -> Vec<T>; }
Expand description

This trait allows sorting a collection in textual order, meaning that items are returned in the same order as they appear in the original text.

Required Methods§

source

fn textual_order(&mut self) -> Vec<T>

Sorts items in the iterator in textual order, meaningthat items are returned in the same order as they appear in the original text. items that do not relate to text at all will be put at the end with arbitrary sorting This method allocates and returns a buffer to do the sorting.

It does deduplication only for iterators over TextSelection, ResultTextSelection.

Implementors§

source§

impl<'store, I> SortTextualOrder<ResultTextSelection<'store>> for I
where I: Iterator<Item = ResultTextSelection<'store>>,

source§

impl<'store, I> SortTextualOrder<ResultItem<'store, Annotation>> for I
where I: Iterator<Item = ResultItem<'store, Annotation>>,

source§

impl<'store, I> SortTextualOrder<TextSelection> for I
where I: Iterator<Item = TextSelection>,

source§

impl<'store, I> SortTextualOrder<TextSelectionSet> for I
where I: Iterator<Item = TextSelectionSet>,