#[repr(C)]pub struct LoopExpr<'ast> { /* private fields */ }
Expand description
An unconditional loop expression
// vvvvvv A loop expression
let _ = loop {
break 3;
// ^^^^^^^ A break expression targeting the loop and returning a value
};
// vvvvvvvvvvvvvvvvvv An infinite loop
'infinite: loop {};
// ^^^^^^^^^ ^^ A block expression as the loop body expression
// |
// An optional label to be targeted by break and continue expressions
Implementations§
Trait Implementations§
Source§impl<'ast> ExprData<'ast> for LoopExpr<'ast>
impl<'ast> ExprData<'ast> for LoopExpr<'ast>
Source§fn precedence(&self) -> ExprPrecedence
fn precedence(&self) -> ExprPrecedence
Returns the
ExprPrecedence
of this expression.Auto Trait Implementations§
impl<'ast> Freeze for LoopExpr<'ast>
impl<'ast> RefUnwindSafe for LoopExpr<'ast>
impl<'ast> !Send for LoopExpr<'ast>
impl<'ast> !Sync for LoopExpr<'ast>
impl<'ast> Unpin for LoopExpr<'ast>
impl<'ast> UnwindSafe for LoopExpr<'ast>
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