Expand description
A collection of room sorters.
Traits§
- Sorter
- A trait “alias” that represents a sorter.
Functions§
- new_
sorter_ latest_ event - Create a new sorter that will sort two
RoomListItem
by their latest events’ state: latest events representing a local event (LatestEventValue::LocalIsSending
orLatestEventValue::LocalCannotBeSent
) come first, and latest event representing a remote event (LatestEventValue::Remote
) come last. - 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 as soon as a sorter returnOrdering::Greater
orOrdering::Less
. - new_
sorter_ name - Create a new sorter that will sort two
RoomListItem
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
RoomListItem
by recency, i.e. by comparing theirRoomInfo::new_latest_event
’s recency (timestamp) if any (i.e. if different fromLatestEventValue::None
), or theirRoomInfo::recency_stamp
value. TheRoom
with the newest recency stamp comes first, i.e. newest < oldest.
Type Aliases§
- Boxed
Sorter Fn Non- target_family="wasm"
- Type alias for a boxed sorter function.