src/global/traits/searchfilteritem.rs

13 lines · 318 bytes

6 symbols in this file
 1/// trait for on single search filter
 2pub trait SearchFilterItem
 3where
 4    Self: Sized,
 5{
 6    // display name of the option
 7    const NAME: &'static str;
 8
 9    fn option_name(&self) -> &'static str;
10    fn ordering() -> Vec<&'static str>;
11    fn selected_index(&self) -> usize;
12    fn at_index(index: usize) -> Self;
13}