ComparableRangeBounds

Trait ComparableRangeBounds 

Source
pub trait ComparableRangeBounds<Q: ?Sized>: RangeBounds<Q> {
    // Provided method
    fn compare_contains<K>(&self, item: &K) -> bool
       where K: ?Sized + Comparable<Q> { ... }
}
Expand description

ComparableRangeBounds is implemented as an extention to RangeBounds to allow for comparison of items with range bounds.

Provided Methods§

Source

fn compare_contains<K>(&self, item: &K) -> bool
where K: ?Sized + Comparable<Q>,

Returns true if item is contained in the range.

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.

Implementors§

Source§

impl<R, Q> ComparableRangeBounds<Q> for R
where R: ?Sized + RangeBounds<Q>, Q: ?Sized,