pub enum Expr<'a> {
Show 20 variants
Unary(Unary<'a>),
Unit(Unit<'a>),
Ident(Ident<'a>),
Binary(Binary<'a>),
Int(Int<'a>),
LetBinding(LetBinding<'a>),
CodeBlock(CodeBlock<'a>),
Str(Str<'a>),
Bool(Bool<'a>),
FuncCall(FuncCall<'a>),
FieldAccess(FieldAccess<'a>),
PathAccess(PathAccess<'a>),
Parenthesized(Parenthesized<'a>),
Conditional(Conditional<'a>),
WhileLoop(WhileLoop<'a>),
ForLoop(ForLoop<'a>),
Array(Array<'a>),
Range(Range<'a>),
Map(MapLiteral<'a>),
Lambda(Lambda<'a>),
}
Expand description
An expression. The base of Compose. Any “statement” is an expression.
§Examples:
1 + 2
foobar()
foo.bar()[0]
let a = (2 / 5) + (7 - 2) * foobar()
Variants§
Unary(Unary<'a>)
Unit(Unit<'a>)
Ident(Ident<'a>)
Binary(Binary<'a>)
Int(Int<'a>)
LetBinding(LetBinding<'a>)
CodeBlock(CodeBlock<'a>)
Str(Str<'a>)
Bool(Bool<'a>)
FuncCall(FuncCall<'a>)
FieldAccess(FieldAccess<'a>)
PathAccess(PathAccess<'a>)
Parenthesized(Parenthesized<'a>)
Conditional(Conditional<'a>)
WhileLoop(WhileLoop<'a>)
ForLoop(ForLoop<'a>)
Array(Array<'a>)
Range(Range<'a>)
Map(MapLiteral<'a>)
Lambda(Lambda<'a>)
Trait Implementations§
impl<'a> Copy for Expr<'a>
Auto Trait Implementations§
impl<'a> Freeze for Expr<'a>
impl<'a> RefUnwindSafe for Expr<'a>
impl<'a> Send for Expr<'a>
impl<'a> Sync for Expr<'a>
impl<'a> Unpin for Expr<'a>
impl<'a> UnwindSafe for Expr<'a>
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