pub struct ForStmt {
pub ident: Ident,
pub iter: ForIter,
pub body: Block,
}Expand description
For loop statement: for i in 0..n { ... } or for x in arr { ... }
Desugared to a while loop during HIR lowering.
Fields§
§ident: IdentLoop variable name.
iter: ForIterIteration source (range or expression).
body: BlockLoop body.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ForStmt
impl RefUnwindSafe for ForStmt
impl Send for ForStmt
impl Sync for ForStmt
impl Unpin for ForStmt
impl UnsafeUnpin for ForStmt
impl UnwindSafe for ForStmt
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