Skip to main content

tallyweb_fuzzy_sort/
lib.rs

1mod simple;
2pub use simple::*;
3
4pub trait FuzzySort<'a> {
5    fn score(&self, a: &'a str) -> u32;
6    fn sort<T: Sortable + 'static>(&self) -> impl FnMut(&T, &T) -> std::cmp::Ordering;
7}
8
9pub trait Sortable {
10    fn as_str(&self) -> &str;
11}