pub struct Expr {
pub val: ExprVal,
pub negated: bool,
pub filters: Vec<FunctionCall>,
}
Expand description
An expression is a value that can be negated and followed by optional filters
Fields§
§val: ExprVal
The expression we are evaluating
negated: bool
Is it using not
?
filters: Vec<FunctionCall>
List of filters used on that value
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn new_negated(val: ExprVal) -> Expr
pub fn new_negated(val: ExprVal) -> Expr
Create a new negated Expr
Sourcepub fn with_filters(val: ExprVal, filters: Vec<FunctionCall>) -> Expr
pub fn with_filters(val: ExprVal, filters: Vec<FunctionCall>) -> Expr
Create a new basic Expr with some filters
Sourcepub fn has_default_filter(&self) -> bool
pub fn has_default_filter(&self) -> bool
Check if the expr has a default filter as first filter
Sourcepub fn is_marked_safe(&self) -> bool
pub fn is_marked_safe(&self) -> bool
Check if the last filter is safe
Trait Implementations§
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
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