referrerpolicy=no-referrer-when-downgrade

Trait IsSortedBy

Source
pub trait IsSortedBy<T> {
    // Required method
    fn is_sorted_by<F>(self, cmp: F) -> bool
       where F: FnMut(&T, &T) -> Ordering;
}
Expand description

Helper trait until is_sorted_by is stabilized. TODO: https://github.com/rust-lang/rust/issues/53485

Required Methods§

Source

fn is_sorted_by<F>(self, cmp: F) -> bool
where F: FnMut(&T, &T) -> Ordering,

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.

Implementors§

Source§

impl<'x, T, X> IsSortedBy<T> for X
where X: 'x + IntoIterator<Item = &'x T>, T: 'x,