pub enum StringExpression {
Pattern(Box<StringPattern>),
NotIn(Box<Self>),
Union(Box<Self>, Box<Self>),
Intersection(Box<Self>, Box<Self>),
}Expand description
AST-level representation of the string matcher expression.
Variants§
Pattern(Box<StringPattern>)
Matches pattern.
NotIn(Box<Self>)
Matches anything other than the expression.
Union(Box<Self>, Box<Self>)
Matches one of the expressions.
Intersection(Box<Self>, Box<Self>)
Matches both expressions.
Implementations§
Source§impl StringExpression
impl StringExpression
Sourcepub fn pattern(pattern: StringPattern) -> Self
pub fn pattern(pattern: StringPattern) -> Self
Expression that matches the given pattern.
Sourcepub fn union_all(expressions: Vec<Self>) -> Self
pub fn union_all(expressions: Vec<Self>) -> Self
Expression that matches any of the given expressions.
Sourcepub fn intersection(self, other: Self) -> Self
pub fn intersection(self, other: Self) -> Self
Expression that matches both self and other.
Sourcepub fn to_matcher(&self) -> StringMatcher
pub fn to_matcher(&self) -> StringMatcher
Transforms the expression tree to matcher object.
Trait Implementations§
Source§impl Clone for StringExpression
impl Clone for StringExpression
Source§fn clone(&self) -> StringExpression
fn clone(&self) -> StringExpression
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StringExpression
impl RefUnwindSafe for StringExpression
impl Send for StringExpression
impl Sync for StringExpression
impl Unpin for StringExpression
impl UnwindSafe for StringExpression
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more