Trait AssertIsSorted

Source
pub trait AssertIsSorted {
    // Required methods
    fn is_sorted_ascending(self) -> Self;
    fn is_sorted_descending(self) -> Self;
}
Expand description

Assert the order of the values within a collection.

These assertions are applicable to ordered collections only.

Required Methods§

Source

fn is_sorted_ascending(self) -> Self

Verifies that the actual collection is sorted in ascending order.

Source

fn is_sorted_descending(self) -> Self

Verifies that the actual collection is sorted in descending order.

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§