[][src]Enum streamson_lib::matcher::combinator::Combinator

pub enum Combinator {
    Matcher(Arc<dyn MatchMaker + Sync>),
    Not(Box<Combinator>),
    And(Box<Combinator>, Box<Combinator>),
    Or(Box<Combinator>, Box<Combinator>),
}

Combines several matches together

It implements normal boolean algebra

  • ! comb will negate the combinator
  • comb1 & comb2 both should pass
  • comb1 | comb2 at least one should pass

Variants

Matcher(Arc<dyn MatchMaker + Sync>)

Represents the actual underlying matcher

Negates the expression

Both expressions should be valid

At least one of the expressions should be valid

Implementations

impl Combinator[src]

pub fn new(matcher: impl MatchMaker + 'static + Sync) -> Self[src]

Creates a new matcher combinator

Arguments

  • matcher - matcher to be wrapped

Trait Implementations

impl BitAnd<Combinator> for Combinator[src]

type Output = Self

The resulting type after applying the & operator.

impl BitOr<Combinator> for Combinator[src]

type Output = Self

The resulting type after applying the | operator.

impl Clone for Combinator[src]

impl Debug for Combinator[src]

impl MatchMaker for Combinator[src]

impl Not for Combinator[src]

type Output = Self

The resulting type after applying the ! operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.