Skip to main content

Intersect

Trait Intersect 

Source
pub trait Intersect<T: ?Sized> {
    type Output;

    // Required method
    fn intersect_with(&self, other: &T) -> Self::Output;
}
Expand description

Trait for computing the intersection of two values.

Required Associated Types§

Required Methods§

Source

fn intersect_with(&self, other: &T) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Intersect<i32> for i32

Source§

fn intersect_with(&self, other: &i32) -> Self::Output

Computes the intersection of two scalars: $\text{intersect}(a,b) = [\max(a,b),; \min(a,b)]$

Source§

type Output = Interval<i32>

Implementors§

Source§

impl<T1, T2> Intersect<Point<T1, T2>> for Point<T1, T2>
where T1: Intersect<T1>, T2: Intersect<T2>,

Source§

type Output = Point<<T1 as Intersect<T1>>::Output, <T2 as Intersect<T2>>::Output>

Source§

impl<T> Intersect<Interval<T>> for Interval<T>
where T: Copy + Ord,

Source§

impl<T> Intersect<Interval<T>> for T
where T: Copy + Ord,

Source§

impl<T> Intersect<T> for Interval<T>
where T: Copy + Ord,