Skip to main content

RangeExt

Trait RangeExt 

Source
pub trait RangeExt<T> {
    // Required method
    fn compare(&self, other: &Range<T>) -> RangeCmpResult<T>;
}
Expand description

Extension trait for ranges

This trait provides a method to compare two ranges and get the result of the comparison.

Required Methods§

Source

fn compare(&self, other: &Range<T>) -> RangeCmpResult<T>

Compare two ranges and get the RangeCmpResult of the comparison

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> RangeExt<T> for Range<T>
where T: Ord + Eq + Copy,

Implementation of the RangeExt trait for all types which implement Ord, Eq and Copy

Source§

fn compare(&self, other: &Range<T>) -> RangeCmpResult<T>

Compare two ranges and get the RangeCmpResult of the comparison

Implementors§