pub struct For {
pub variable: LitSym,
pub range: Range,
pub body: Box<Expr>,
pub span: Range<usize>,
}Expand description
A for loop expression, such as for i in 0..10 then print(i). The loop body is executed for
each value in the specified range, with the variable taking on the current value.
Fields§
§variable: LitSymThe variable name representing each value in the range.
range: RangeThe range of values that the variable will take on.
body: Box<Expr>The body of the summation.
span: Range<usize>The region of the source code that this for expression was parsed from.
Implementations§
Trait Implementations§
Source§impl Latex for For
impl Latex for For
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 For
impl<'source> Parse<'source> for For
impl Eq for For
impl StructuralPartialEq for For
Auto Trait Implementations§
impl Freeze for For
impl RefUnwindSafe for For
impl Send for For
impl Sync for For
impl Unpin for For
impl UnwindSafe for For
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