pub struct NumericalFor {
pub for_keyword: Token,
pub variable: Name,
pub equal_keyword: Token,
pub start: Pointer<Expression>,
pub start_comma: Token,
pub end: Pointer<Expression>,
pub end_comma: Option<Token>,
pub step: Option<Pointer<Expression>>,
pub do_block: DoBlock,
}Expand description
A struct representing a numerical for loop.
Fields§
§for_keyword: TokenThe for keyword.
variable: NameThe name after the for keyword.
equal_keyword: TokenThe = character.
start: Pointer<Expression>The start of the loop.
start_comma: TokenThe comma after the start.
end: Pointer<Expression>The end of the loop.
end_comma: Option<Token>The comma after the end of the loop.
step: Option<Pointer<Expression>>The optional step of the loop.
do_block: DoBlockThe do block at the end
Trait Implementations§
Source§impl Clone for NumericalFor
impl Clone for NumericalFor
Source§fn clone(&self) -> NumericalFor
fn clone(&self) -> NumericalFor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumericalFor
impl Debug for NumericalFor
Source§impl GetRange for NumericalFor
impl GetRange for NumericalFor
Source§impl Hash for NumericalFor
impl Hash for NumericalFor
Source§impl Ord for NumericalFor
impl Ord for NumericalFor
Source§fn cmp(&self, other: &NumericalFor) -> Ordering
fn cmp(&self, other: &NumericalFor) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl Parse for NumericalFor
impl Parse for NumericalFor
Source§impl PartialEq for NumericalFor
impl PartialEq for NumericalFor
Source§impl PartialOrd for NumericalFor
impl PartialOrd for NumericalFor
Source§impl Print for NumericalFor
impl Print for NumericalFor
Source§fn print_final_trivia(&self) -> String
fn print_final_trivia(&self) -> String
Prints only the very final trivia. Used for the default implementation of
Print::print, which just joins Print::print_without_final_trivia
and this function.Source§fn print_without_final_trivia(&self) -> String
fn print_without_final_trivia(&self) -> String
Prints the whole token including all surrounding trivia, excluding the
very last trailing trivia.
impl Eq for NumericalFor
impl StructuralPartialEq for NumericalFor
Auto Trait Implementations§
impl Freeze for NumericalFor
impl RefUnwindSafe for NumericalFor
impl !Send for NumericalFor
impl !Sync for NumericalFor
impl Unpin for NumericalFor
impl UnwindSafe for NumericalFor
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