Trait collate::Collate [−][src]
Defines methods to collate a collection of slices of type Value
, given a comparator.
Associated Types
Loading content...Required methods
fn compare(&self, left: &Self::Value, right: &Self::Value) -> Ordering
[src]
Define the relative ordering of Self::Value
.
Provided methods
fn bisect<V: AsRef<[Self::Value]>, B: Borrow<[Self::Value]>>(
&self,
slice: &[V],
range: &Range<Self::Value, B>
) -> (usize, usize)
[src]
&self,
slice: &[V],
range: &Range<Self::Value, B>
) -> (usize, usize)
Given a collection of slices, return the start and end indices which match the given range.
fn bisect_left<V: AsRef<[Self::Value]>>(
&self,
slice: &[V],
key: &[Self::Value]
) -> usize
[src]
&self,
slice: &[V],
key: &[Self::Value]
) -> usize
Given a collection of slices, return the leftmost insert point matching the given key.
fn bisect_right<V: AsRef<[Self::Value]>>(
&self,
slice: &[V],
key: &[Self::Value]
) -> usize
[src]
&self,
slice: &[V],
key: &[Self::Value]
) -> usize
Given a collection of slices, return the rightmost insert point matching the given key.
fn compare_range<B: Borrow<[Self::Value]>>(
&self,
key: &[Self::Value],
range: &Range<Self::Value, B>
) -> Ordering
[src]
&self,
key: &[Self::Value],
range: &Range<Self::Value, B>
) -> Ordering
Returns the ordering of the given key relative to the given range.
fn compare_slice<L: AsRef<[Self::Value]>, R: AsRef<[Self::Value]>>(
&self,
left: L,
right: R
) -> Ordering
[src]
&self,
left: L,
right: R
) -> Ordering
Returns the relative ordering of the left
slice with respect to right
.
fn is_sorted<V: AsRef<[Self::Value]>>(&self, slice: &[V]) -> bool
[src]
Returns true
if the given slice is in sorted order.