Skip to main content

IsSorted

Trait IsSorted 

Source
pub trait IsSorted<T: PartialEq + PartialOrd + Clone + Copy> {
    // Required method
    fn is_sorted(&self) -> bool;
}
Expand description

A trait providing the is_sorted method on Vec’s implementing T.

Required Methods§

Source

fn is_sorted(&self) -> bool

Returns whether the given Vec is sorted or not.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> IsSorted<T> for Vec<T>
where T: PartialEq + PartialOrd + Clone + Copy,

The trait implementation providing the is_sorted method.

Source§

fn is_sorted(&self) -> bool

Implementors§