pub enum Expr {
Show 14 variants
Num(f64),
Var,
Field(String),
Control(String),
Str(String),
Match(Box<Expr>),
InSet(String, Box<Expr>),
Neg(Box<Expr>),
Not(Box<Expr>),
Call(String, Vec<Expr>),
InList(Box<Expr>, Vec<Expr>),
InRange(Box<Expr>, Box<Expr>, Box<Expr>),
Cond(Box<Expr>, Box<Expr>, Box<Expr>),
Bin(BinOp, Box<Expr>, Box<Expr>),
}Variants§
Num(f64)
Var
The pipeline input scalar.
Field(String)
A named field of the current record, resolved at eval time.
Control(String)
A live control reference (.th — an input/control widget’s value),
written .name in a predicate. resolve_pipeline substitutes it with a
Num before eval when the control holds a number; unresolved -> NaN.
Str(String)
A string literal — only produced by substituting a string control.
Match(Box<Expr>)
match(.q) — substring test of the whole line against a control’s text.
Evaluated Rust-side (not on the numeric VM); empty control -> matches all.
InSet(String, Box<Expr>)
<field> in .lv — set membership: keep lines whose FIELD value is in the
control’s comma-separated selected set. Empty set -> matches all.
Neg(Box<Expr>)
Not(Box<Expr>)
Logical negation: truthy input -> 0, falsy -> 1.
Call(String, Vec<Expr>)
name(arg, …) — a call to an inline-Rust FFI export registered by a
rust { ... } block. Numeric-only: each arg is evaluated to an f64 and
marshaled as a fusevm::Value::float; the export’s return is read back as
an f64. An unregistered name (or a failed call) evaluates to NaN, so a
comparison against it is simply false.
InList(Box<Expr>, Vec<Expr>)
Membership: left in [a, b, c] — truthy iff left equals any element
(jq IN). Empty list is always falsy.
InRange(Box<Expr>, Box<Expr>, Box<Expr>)
Range membership: left in lo..hi — truthy iff lo <= left <= hi.
Cond(Box<Expr>, Box<Expr>, Box<Expr>)
Ternary cond ? then : else — only the taken branch is evaluated (real
fusevm branching), so a guarded x != 0 ? 100/x : 0 never divides by 0.
Bin(BinOp, Box<Expr>, Box<Expr>)
Trait Implementations§
Auto Trait Implementations§
impl Forget for Expr
impl Freeze for Expr
impl Move for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> ⓘ
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