pub enum BinaryOp<S> {
Pipe(Option<Pattern<S>>),
Comma,
Alt,
Or,
And,
Math(Math),
Cmp(Cmp),
Assign,
Update,
UpdateMath(Math),
UpdateAlt,
}Expand description
Binary operators, such as |, ,, //, …
Variants§
Pipe(Option<Pattern<S>>)
Application, i.e. l | r if no string is given, else l as $x | r
Comma
Concatenation, i.e. l, r
Alt
Alternation, i.e. l // r
Or
Logical disjunction, i.e. l or r
And
Logical conjunction, i.e. l and r
Math(Math)
Mathematical operation, e.g. l + r, l - r, …
Cmp(Cmp)
Comparison operation, e.g. l == r, l <= r, …
Assign
Assignment, i.e. l = r,
Update
Update, i.e. l |= r
UpdateMath(Math)
Mathematical assignment, i.e. l += r, l -= r, …
(this is identical to r as $x | l |= . + $x, …)
UpdateAlt
l //= r
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for BinaryOp<S>where
S: Freeze,
impl<S> RefUnwindSafe for BinaryOp<S>where
S: RefUnwindSafe,
impl<S> Send for BinaryOp<S>where
S: Send,
impl<S> Sync for BinaryOp<S>where
S: Sync,
impl<S> Unpin for BinaryOp<S>where
S: Unpin,
impl<S> UnsafeUnpin for BinaryOp<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for BinaryOp<S>where
S: UnwindSafe,
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