tallyweb-fuzzy-sort 0.1.0

A fuzzy sort library for use with the tallyweb site package
Documentation
1
2
3
4
5
6
7
8
9
10
11
mod simple;
pub use simple::*;

pub trait FuzzySort<'a> {
    fn score(&self, a: &'a str) -> u32;
    fn sort<T: Sortable + 'static>(&self) -> impl FnMut(&T, &T) -> std::cmp::Ordering;
}

pub trait Sortable {
    fn as_str(&self) -> &str;
}