Trait Union

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

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

Trait for types that can be combined in the form of a union.

The union of a collection of sets is the set that contains all elements in the collection.

Required Methods§

Source

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

Return a space enclosing self and other of type Self.

Provided Methods§

Source

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

Return a 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 Union for Range<usize>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§