Trait fera_graph::ext::GraphsSliceExt [] [src]

pub trait GraphsSliceExt<T> {
    fn is_sorted_by_prop<P, K>(&self, prop: P) -> bool
    where
        P: PropGet<K>,
        &'a T: IntoOwned<K>,
        P::Output: Ord
;
fn sort_by_prop<P, K>(&mut self, prop: P)
    where
        P: PropGet<K>,
        &'a T: IntoOwned<K>,
        P::Output: Ord
;
fn sort_unstable_by_prop<P, K>(&mut self, prop: P)
    where
        P: PropGet<K>,
        &'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>,
        &'a T: IntoOwned<K>,
        P::Output: Ord
; }

Extension trait for slices.

See the module documentation for examples.

Required Methods

Returns true if a slice is sorted according to a property, otherwise, returns false.

Sort a slice using a property.

This functions calls slice::sort_by_key.

Sort a slice using a property.

This functions calls slice::sort_unstable_by_key.

Binary searches a slice that is sorted by a property.

This functions calls slice::binary_search_by_key.

Implementations on Foreign Types

impl<T> GraphsSliceExt<T> for [T]
[src]

[src]

[src]

[src]

[src]

Implementors