pub trait ExtSortByExtension: Iterator {
type Run: Run<Self::Item>;
// Required methods
fn external_sort_by<F>(
self,
options: ExtsortConfig,
comparator: F
) -> Result<LoserTree<Self::Item, ExternalRun<Self::Item, Box<dyn Read>>, FuncOrderer<F>>>
where F: Fn(&Self::Item, &Self::Item) -> Ordering;
fn external_sort_by_key<F, K>(
self,
options: ExtsortConfig,
key_extractor: F
) -> Result<LoserTree<Self::Item, ExternalRun<Self::Item, Box<dyn Read>>, KeyOrderer<F>>>
where F: Fn(&Self::Item) -> K,
K: Ord;
}Required Associated Types§
Required Methods§
sourcefn external_sort_by<F>(
self,
options: ExtsortConfig,
comparator: F
) -> Result<LoserTree<Self::Item, ExternalRun<Self::Item, Box<dyn Read>>, FuncOrderer<F>>>where
F: Fn(&Self::Item, &Self::Item) -> Ordering,
fn external_sort_by<F>( self, options: ExtsortConfig, comparator: F ) -> Result<LoserTree<Self::Item, ExternalRun<Self::Item, Box<dyn Read>>, FuncOrderer<F>>>where F: Fn(&Self::Item, &Self::Item) -> Ordering,
Sorts the provided Iterator according to the provided config using a custom comparator function
Errors
This function may error if a sort file fails to be written. In this case the library will do its best to clean up the already written files, but no guarantee is made.
sourcefn external_sort_by_key<F, K>(
self,
options: ExtsortConfig,
key_extractor: F
) -> Result<LoserTree<Self::Item, ExternalRun<Self::Item, Box<dyn Read>>, KeyOrderer<F>>>where
F: Fn(&Self::Item) -> K,
K: Ord,
fn external_sort_by_key<F, K>( self, options: ExtsortConfig, key_extractor: F ) -> Result<LoserTree<Self::Item, ExternalRun<Self::Item, Box<dyn Read>>, KeyOrderer<F>>>where F: Fn(&Self::Item) -> K, K: Ord,
Sorts the provided Iterator according to the provided config using a key extraction function.
Errors
This function may error if a sort file fails to be written. In this case the library will do its best to clean up the already written files, but no guarantee is made.