Struct rune::ast::ExprBreak[][src]

pub struct ExprBreak {
    pub attributes: Vec<Attribute>,
    pub break_token: Break,
    pub expr: Option<ExprBreakValue>,
}

A break statement: break [expr].

use rune::{testing, ast};

testing::roundtrip::<ast::ExprBreak>("break");
testing::roundtrip::<ast::ExprBreak>("break 42");
testing::roundtrip::<ast::ExprBreak>("#[attr] break 42");

Fields

attributes: Vec<Attribute>

The attributes of the break expression

break_token: Break

The return token.

expr: Option<ExprBreakValue>

An optional expression to break with.

Implementations

impl ExprBreak[src]

pub fn parse_with_meta(
    parser: &mut Parser<'_>,
    attributes: Vec<Attribute>
) -> Result<Self, ParseError>
[src]

Parse #ident and attach the given meta

Trait Implementations

impl Clone for ExprBreak[src]

impl Debug for ExprBreak[src]

impl Eq for ExprBreak[src]

impl Parse for ExprBreak[src]

impl PartialEq<ExprBreak> for ExprBreak[src]

impl Spanned for ExprBreak[src]

impl StructuralEq for ExprBreak[src]

impl StructuralPartialEq for ExprBreak[src]

impl ToTokens for ExprBreak[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.