pub struct Of {
pub expr: Box<Expr>,
pub span: Range<usize>,
pub of_span: Range<usize>,
}Expand description
An of expression, such as of x.
An of expression’s body is repeatedly evaluated during summation or product expressions,
with a specific variable in the of expression taking on each value in the range of the
summation or product. It is only valid in the context of sum and product expressions, and
is used to concisely write one-line sum and product expressions, such as sum x in 1..10 of x.
Fields§
§expr: Box<Expr>The expression to evaluate.
span: Range<usize>The region of the source code that this expression was parsed from.
of_span: Range<usize>The span of the of keyword.
Implementations§
Trait Implementations§
Source§impl Latex for Of
impl Latex for Of
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 Of
impl<'source> Parse<'source> for Of
impl Eq for Of
impl StructuralPartialEq for Of
Auto Trait Implementations§
impl Freeze for Of
impl RefUnwindSafe for Of
impl Send for Of
impl Sync for Of
impl Unpin for Of
impl UnwindSafe for Of
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