pub trait SortableList {
// Required methods
fn sort_state(&self) -> SortState;
fn apply_sort(&mut self, state: &SortState, tx: &AppTx);
fn allows_property(&self) -> bool;
// Provided method
fn is_unsorted(&self) -> bool { ... }
}Expand description
A list the sort dialog can sort.
Required Methods§
fn sort_state(&self) -> SortState
Sourcefn apply_sort(&mut self, state: &SortState, tx: &AppTx)
fn apply_sort(&mut self, state: &SortState, tx: &AppTx)
Apply a selection from the sort dialog. Property sorts are only
offered where Self::allows_property says so.
Sourcefn allows_property(&self) -> bool
fn allows_property(&self) -> bool
Whether the dialog offers Property. Query-backed lists put the key in
the query; listings fetch values with PropertySort.
Provided Methods§
Sourcefn is_unsorted(&self) -> bool
fn is_unsorted(&self) -> bool
The rows are in the list’s natural order (recency, match rank), not
any sort the dialog offers — it then shows “Unsorted” until a pick.
Self::sort_state still names the field / order the first toggle
starts from. Only the file finder and the Ctrl+K recents say so.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".