pub trait SortableBookmarkableWeave<K, N, T>: BookmarkableWeave<K, N, T> + SortableWeave<K, N, T>{
// Required methods
fn sort_bookmarks_by(&mut self, cmp: impl FnMut(&N, &N) -> Ordering);
fn sort_bookmarks_by_id(&mut self, cmp: impl FnMut(&K, &K) -> Ordering);
}Expand description
A Weave where the ordering of bookmarked nodes is stable and can be user-defined.
Required Methods§
Sourcefn sort_bookmarks_by(&mut self, cmp: impl FnMut(&N, &N) -> Ordering)
fn sort_bookmarks_by(&mut self, cmp: impl FnMut(&N, &N) -> Ordering)
Sorts bookmarked nodes using the comparison function cmp.
§Panics
May panic if cmp does not implement a total order, or if cmp itself panics.
Sourcefn sort_bookmarks_by_id(&mut self, cmp: impl FnMut(&K, &K) -> Ordering)
fn sort_bookmarks_by_id(&mut self, cmp: impl FnMut(&K, &K) -> Ordering)
Sorts the identifiers of bookmarked nodes using the comparison function cmp.
§Panics
May panic if cmp does not implement a total order, or if cmp itself panics.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".