pub struct While {
pub condition: Box<Expr>,
pub body: Box<Expr>,
pub span: Range<usize>,
pub while_span: Range<usize>,
}Expand description
A while loop expression, such as while x < 10 then x += 1. The loop body is executed
repeatedly as long as the outer condition is true.
Fields§
§condition: Box<Expr>The condition that must be true for the loop body to be executed.
body: Box<Expr>The body of the loop.
span: Range<usize>The region of the source code that this expression was parsed from.
while_span: Range<usize>The span of the while keyword.
Implementations§
Trait Implementations§
Source§impl Latex for While
impl Latex for While
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 While
impl<'source> Parse<'source> for While
impl Eq for While
impl StructuralPartialEq for While
Auto Trait Implementations§
impl Freeze for While
impl RefUnwindSafe for While
impl Send for While
impl Sync for While
impl Unpin for While
impl UnwindSafe for While
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