pub enum Expr {
Show 13 variants
Lit(Value),
Dur(i64),
Now,
Path {
root: Root,
path: Vec<Seg>,
},
Not(Box<Expr>),
Neg(Box<Expr>),
Bin {
op: BinOp,
l: Box<Expr>,
r: Box<Expr>,
},
Coalesce(Box<Expr>, Box<Expr>),
If {
c: Box<Expr>,
t: Box<Expr>,
e: Box<Expr>,
},
Array(Vec<Expr>),
In {
l: Box<Expr>,
r: Box<Expr>,
negate: bool,
},
Method {
obj: Box<Expr>,
name: String,
args: Vec<Expr>,
},
Call {
name: String,
args: Vec<Expr>,
},
}Expand description
A compiled expression.
Variants§
Lit(Value)
A literal JSON value.
Dur(i64)
A duration literal, in seconds. It adds to or subtracts from a time.
Now
now(): the time the step runs, as RFC 3339 text.
Path
A path.
Not(Box<Expr>)
!x
Neg(Box<Expr>)
-x
Bin
l op r
Coalesce(Box<Expr>, Box<Expr>)
l ?? r: l, unless it is null.
If
c ? t : e
Array(Vec<Expr>)
[a, b]
In
l in r (or not in when negate): membership of an array, a substring of a string.
Method
obj.name(args): length, contains, includes, starts_with, ends_with.
Call
name(args): new_uuid, coalesce, len, or a function the workflow declares.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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