Grouping

Trait Grouping 

Source
pub trait Grouping<const MCL: usize, const MCC: usize, const MPL: usize, S>: PartialOrd + Sized {
    // Required methods
    fn wdm_includes<Coord>(&self, coord: &Coord) -> bool
       where Coord: Coordinatelike<MCL, MCC, MPL, S> + ?Sized;
    fn wdm_intersection(&self, other: &Self) -> Result<Self, EmptyGrouping>
       where S: Clone;

    // Provided methods
    fn wdm_includes_grouping(&self, other: &Self) -> bool { ... }
    fn wdm_strictly_includes_grouping(&self, other: &Self) -> bool { ... }
    fn wdm_includes_in_intersection<Coord>(
        &self,
        other: &Self,
        coord: &Coord,
    ) -> bool
       where Coord: Coordinatelike<MCL, MCC, MPL, S> + ?Sized { ... }
}
Expand description

A grouping of entries.

A grouping describes a non-empty set of Coordinatelike values, with Grouping::wdm_includes providing the membership test. Groupings must implement PartialOrd as the subset relation.

Required Methods§

Source

fn wdm_includes<Coord>(&self, coord: &Coord) -> bool
where Coord: Coordinatelike<MCL, MCC, MPL, S> + ?Sized,

Returns true iff the given Coordinatelike value is included in this grouping.

Source

fn wdm_intersection(&self, other: &Self) -> Result<Self, EmptyGrouping>
where S: Clone,

Returns a grouping which includes exactly those values included by both self and other. If that set would be empty, returns an EmptyGrouping error instead.

Provided Methods§

Source

fn wdm_includes_grouping(&self, other: &Self) -> bool

Returns true iff every value included in other is also included in self.

Source

fn wdm_strictly_includes_grouping(&self, other: &Self) -> bool

Returns true iff every value included in other is also included in self and self and other are not equal.

Source

fn wdm_includes_in_intersection<Coord>( &self, other: &Self, coord: &Coord, ) -> bool
where Coord: Coordinatelike<MCL, MCC, MPL, S> + ?Sized,

Returns true iff the given Coordinatelike value is included in both self and other.

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.

Implementors§

Source§

impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Grouping<MCL, MCC, MPL, S> for Area<MCL, MCC, MPL, S>
where S: PartialEq,

Source§

impl<const MCL: usize, const MCC: usize, const MPL: usize, S> Grouping<MCL, MCC, MPL, S> for Range3d<MCL, MCC, MPL, S>
where S: PartialOrd,