Module sorters

Source
Expand description

A collection of room sorters.

Traits§

Sorter
A trait “alias” that represents a sorter.

Functions§

new_sorter_lexicographic
Create a new sorter that will run multiple sorters. When the nth sorter returns Ordering::Equal, the next sorter is called. It stops at soon as a sorter return Ordering::Greater or Ordering::Less.
new_sorter_name
Create a new sorter that will sort two Room by name, i.e. by comparing their display names. A lexicographically ordering is applied, i.e. “a” < “b”.
new_sorter_recency
Create a new sorter that will sort two Room by recency, i.e. by comparing their RoomInfo::recency_stamp value. The Room with the newest recency stamp comes first, i.e. newest < oldest.

Type Aliases§

BoxedSorterFn
Type alias for a boxed sorter function.