splinter_rs/ops.rs
1pub trait Cut<Rhs = Self> {
2 type Output;
3
4 /// Returns the intersection between self and other while removing the
5 /// intersection from self
6 fn cut(&mut self, rhs: &Rhs) -> Self::Output;
7}
8
9pub trait Intersection<Rhs = Self> {
10 type Output;
11
12 /// Returns the intersection between self and other
13 fn intersection(&self, rhs: &Rhs) -> Self::Output;
14}
15
16pub trait Union<Rhs = Self> {
17 type Output;
18
19 /// Returns the union between self and other
20 fn union(&self, rhs: &Rhs) -> Self::Output;
21}
22
23pub trait Merge<Rhs = Self> {
24 /// Merges rhs into self
25 fn merge(&mut self, rhs: &Rhs);
26}