Implement 3-{and,or} variants
This commit is contained in:
parent
41564a7d8e
commit
d4cee5459f
1 changed files with 12 additions and 0 deletions
|
@ -20,11 +20,23 @@ pub trait Filter {
|
|||
Or::new(Box::new(self), other)
|
||||
}
|
||||
|
||||
fn or3(self, other: Box<Filter>, other2: Box<Filter>) -> Or
|
||||
where Self: Sized + 'static
|
||||
{
|
||||
Or::new(Box::new(self), Box::new(Or::new(other, other2)))
|
||||
}
|
||||
|
||||
fn and(self, other: Box<Filter>) -> And
|
||||
where Self: Sized + 'static
|
||||
{
|
||||
And::new(Box::new(self), other)
|
||||
}
|
||||
|
||||
fn and3(self, other: Box<Filter>, other2: Box<Filter>) -> And
|
||||
where Self: Sized + 'static
|
||||
{
|
||||
And::new(Box::new(self), Box::new(And::new(other, other2)))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue