Trait Intersect

Source
pub trait Intersect<S = Self> {
    // Required method
    fn intersect(self, other: &S) -> Self;

    // Provided method
    fn intersect_many(self, other_spaces: &[S]) -> Self
       where Self: Sized { ... }
}
Expand description

Trait for types that can be combined in the form of an intersection.

The intersection of a collection of sets is the set that contains only those elements present in each.

Required Methods§

Source

fn intersect(self, other: &S) -> Self

Return the smallest space enclosing self and other of type Self.

Provided Methods§

Source

fn intersect_many(self, other_spaces: &[S]) -> Self
where Self: Sized,

Return the smallest space enclosing self and all other_spaces of type 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 Intersect for Range<usize>

Source§

fn intersect(self, other: &Range<usize>) -> Range<usize>

Source§

impl<D1: Intersect, D2: Intersect> Intersect for (D1, D2)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect> Intersect for (D1, D2, D3)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect> Intersect for (D1, D2, D3, D4)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect> Intersect for (D1, D2, D3, D4, D5)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect> Intersect for (D1, D2, D3, D4, D5, D6)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect, D7: Intersect> Intersect for (D1, D2, D3, D4, D5, D6, D7)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect, D7: Intersect, D8: Intersect> Intersect for (D1, D2, D3, D4, D5, D6, D7, D8)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect, D7: Intersect, D8: Intersect, D9: Intersect> Intersect for (D1, D2, D3, D4, D5, D6, D7, D8, D9)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect, D7: Intersect, D8: Intersect, D9: Intersect, D10: Intersect> Intersect for (D1, D2, D3, D4, D5, D6, D7, D8, D9, D10)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect, D7: Intersect, D8: Intersect, D9: Intersect, D10: Intersect, D11: Intersect> Intersect for (D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D1: Intersect, D2: Intersect, D3: Intersect, D4: Intersect, D5: Intersect, D6: Intersect, D7: Intersect, D8: Intersect, D9: Intersect, D10: Intersect, D11: Intersect, D12: Intersect> Intersect for (D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12)

Source§

fn intersect(self, other: &Self) -> Self

Source§

impl<D: Space + Intersect + Clone, const N: usize> Intersect for [D; N]

Source§

fn intersect(self, other: &Self) -> Self

Implementors§