Struct marker_api::ast::BreakExpr
source · #[repr(C)]pub struct BreakExpr<'ast> { /* private fields */ }Expand description
A break expression with an optional label and an optional value.
for i in 0..10 {
if i == 2 {
break;
// ^^^^^ A break expression targeting the for loop
}
}
let _ = 'label: {
// vvvvvvvvvvvvvv A break expression with a label and a value
break 'label 4;
// ^^^^^^ ^ An integer literal being returned as a value of the target
// |
// An optional label, specifying which labeled expression is the target
};Implementations§
Trait Implementations§
source§impl<'ast> ExprData<'ast> for BreakExpr<'ast>
impl<'ast> ExprData<'ast> for BreakExpr<'ast>
source§fn precedence(&self) -> ExprPrecedence
fn precedence(&self) -> ExprPrecedence
Returns the
ExprPrecedence of this expression.Auto Trait Implementations§
impl<'ast> RefUnwindSafe for BreakExpr<'ast>
impl<'ast> !Send for BreakExpr<'ast>
impl<'ast> !Sync for BreakExpr<'ast>
impl<'ast> Unpin for BreakExpr<'ast>
impl<'ast> UnwindSafe for BreakExpr<'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