pub struct Then {
pub expr: Box<Expr>,
pub span: Range<usize>,
pub then_span: Range<usize>,
}Expand description
A then expression, such as then x += 1.
A then expression simply evaluates the expression that follows the then keyword, and
returns its result. It is only valid in the context of if and while expressions, and is
used to concisely write one-line if and while expressions, such as if x < 10 then x += 1.
Fields§
§expr: Box<Expr>The expression to evaluate.
span: Range<usize>The region of the source code that this expression was parsed from.
then_span: Range<usize>The span of the then keyword.
Implementations§
Trait Implementations§
Source§impl Latex for Then
impl Latex for Then
Source§fn as_display(&self) -> LatexFormatter<'_, Self>
fn as_display(&self) -> LatexFormatter<'_, Self>
Wraps the value in a
LatexFormatter, which implements Display.Source§impl<'source> Parse<'source> for Then
impl<'source> Parse<'source> for Then
impl Eq for Then
impl StructuralPartialEq for Then
Auto Trait Implementations§
impl Freeze for Then
impl RefUnwindSafe for Then
impl Send for Then
impl Sync for Then
impl Unpin for Then
impl UnwindSafe for Then
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