GraphsVecExt

Trait GraphsVecExt 

Source
pub trait GraphsVecExt<T> {
    // Required methods
    fn sorted_by_prop<P, K>(self, prop: P) -> Self
       where P: PropGet<K>,
             for<'a> &'a T: IntoOwned<K>,
             P::Output: Ord;
    fn sorted_unstable_by_prop<P, K>(self, prop: P) -> Self
       where P: PropGet<K>,
             for<'a> &'a T: IntoOwned<K>,
             P::Output: Ord;
}
Expand description

Extension trait for vectors.

See the module documentation for examples.

Required Methods§

Source

fn sorted_by_prop<P, K>(self, prop: P) -> Self
where P: PropGet<K>, for<'a> &'a T: IntoOwned<K>, P::Output: Ord,

Returns a vector sorted by a property.

This functions calls GraphsSliceExt::sort_by_prop.

Source

fn sorted_unstable_by_prop<P, K>(self, prop: P) -> Self
where P: PropGet<K>, for<'a> &'a T: IntoOwned<K>, P::Output: Ord,

Returns a vector sorted by a property.

This functions calls GraphsSliceExt::sort_unstable_by_prop.

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.

Implementations on Foreign Types§

Source§

impl<T> GraphsVecExt<T> for Vec<T>

Source§

fn sorted_by_prop<P, K>(self, prop: P) -> Self
where P: PropGet<K>, for<'a> &'a T: IntoOwned<K>, P::Output: Ord,

Source§

fn sorted_unstable_by_prop<P, K>(self, prop: P) -> Self
where P: PropGet<K>, for<'a> &'a T: IntoOwned<K>, P::Output: Ord,

Implementors§