Trait RangeOperations

Source
pub trait RangeOperations<Rhs: ?Sized = Self>
where Self: Sized,
{ // Required methods fn intersects(&self, rhs: &Rhs) -> bool; fn covering(&self, rhs: &Rhs) -> bool; fn covered_by(&self, rhs: &Rhs) -> bool; fn union(&self, rhs: &Rhs) -> Option<Self>; }

Required Methods§

Source

fn intersects(&self, rhs: &Rhs) -> bool

Source

fn covering(&self, rhs: &Rhs) -> bool

Source

fn covered_by(&self, rhs: &Rhs) -> bool

Source

fn union(&self, rhs: &Rhs) -> Option<Self>

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<Idx> RangeOperations for Range<Idx>
where Idx: PartialOrd + Copy,

Source§

fn intersects(&self, rhs: &Range<Idx>) -> bool

Source§

fn covering(&self, rhs: &Range<Idx>) -> bool

Source§

fn covered_by(&self, rhs: &Range<Idx>) -> bool

Source§

fn union(&self, rhs: &Range<Idx>) -> Option<Range<Idx>>

Implementors§