Skip to main content

COPredicates

Trait COPredicates 

Source
pub trait COPredicates: COBounds {
    // Required methods
    fn contains(self, x: Self::CoordType) -> bool;
    fn contains_interval(self, other: Self) -> bool;
    fn intersects(self, other: Self) -> bool;
    fn is_adjacent(self, other: Self) -> bool;
    fn is_contiguous_with(self, other: Self) -> bool;
}
Expand description

Containment and overlap predicates for closed-open intervals.

Required Methods§

Source

fn contains(self, x: Self::CoordType) -> bool

Returns whether x is contained in this interval.

Source

fn contains_interval(self, other: Self) -> bool

Returns whether other is fully contained in this interval.

Source

fn intersects(self, other: Self) -> bool

Returns whether this interval and other overlap with positive length.

Source

fn is_adjacent(self, other: Self) -> bool

Returns whether this interval and other touch at exactly one boundary without overlapping.

Source

fn is_contiguous_with(self, other: Self) -> bool

Returns whether this interval and other overlap or are adjacent.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§