pub trait GraphsSliceExt<T> {
// Required methods
fn is_sorted_by_prop<P, K>(&self, prop: P) -> bool
where P: PropGet<K>,
for<'a> &'a T: IntoOwned<K>,
P::Output: Ord;
fn sort_by_prop<P, K>(&mut self, prop: P)
where P: PropGet<K>,
for<'a> &'a T: IntoOwned<K>,
P::Output: Ord;
fn sort_unstable_by_prop<P, K>(&mut self, prop: P)
where P: PropGet<K>,
for<'a> &'a T: IntoOwned<K>,
P::Output: Ord;
fn binary_search_by_prop<P, K>(
&self,
prop_value: &P::Output,
prop: P,
) -> Result<usize, usize>
where P: PropGet<K>,
for<'a> &'a T: IntoOwned<K>,
P::Output: Ord;
}Expand description
Extension trait for slices.
See the module documentation for examples.
Required Methods§
Sourcefn is_sorted_by_prop<P, K>(&self, prop: P) -> bool
fn is_sorted_by_prop<P, K>(&self, prop: P) -> bool
Returns true if a slice is sorted according to a property, otherwise, returns false.
Sourcefn sort_by_prop<P, K>(&mut self, prop: P)
fn sort_by_prop<P, K>(&mut self, prop: P)
Sort a slice using a property.
This functions calls slice::sort_by_key.
Sourcefn sort_unstable_by_prop<P, K>(&mut self, prop: P)
fn sort_unstable_by_prop<P, K>(&mut self, prop: P)
Sort a slice using a property.
This functions calls slice::sort_unstable_by_key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.