pub struct GenericFor<'a> {
pub for_: TokenReference<'a>,
pub names: Punctuated<'a, Name<'a>>,
pub in_: TokenReference<'a>,
pub exprs: Punctuated<'a, Box<Expr<'a>>>,
pub do_: TokenReference<'a>,
pub block: Box<Block<'a>>,
pub end: TokenReference<'a>,
}Expand description
A generic for loop:
for a, b in iter, state, init do
...
endFields§
§for_: TokenReference<'a>A reference to the Symbol::For token.
names: Punctuated<'a, Name<'a>>The loop variable names.
in_: TokenReference<'a>A reference to the Symbol::In token.
exprs: Punctuated<'a, Box<Expr<'a>>>The iterator expressions.
do_: TokenReference<'a>A reference to the Symbol::Do token.
block: Box<Block<'a>>The loop body.
end: TokenReference<'a>A reference to the Symbol::End token.
Trait Implementations§
Source§impl<'a> AstDescend<'a> for GenericFor<'a>
impl<'a> AstDescend<'a> for GenericFor<'a>
fn descend_mut<T: VisitorMut<'a>>(&mut self, visitor: &mut T)
Source§impl<'a> Clone for GenericFor<'a>
impl<'a> Clone for GenericFor<'a>
Source§fn clone(&self) -> GenericFor<'a>
fn clone(&self) -> GenericFor<'a>
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<'a> Debug for GenericFor<'a>
impl<'a> Debug for GenericFor<'a>
Source§impl Display for GenericFor<'_>
impl Display for GenericFor<'_>
Auto Trait Implementations§
impl<'a> Freeze for GenericFor<'a>
impl<'a> RefUnwindSafe for GenericFor<'a>
impl<'a> Send for GenericFor<'a>
impl<'a> Sync for GenericFor<'a>
impl<'a> Unpin for GenericFor<'a>
impl<'a> UnwindSafe for GenericFor<'a>
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