Struct rune::ast::ExprLoop[][src]

pub struct ExprLoop {
    pub attributes: Vec<Attribute>,
    pub label: Option<(Label, Colon)>,
    pub loop_token: Loop,
    pub body: Box<Block>,
}

A loop expression: loop { ... }.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::ExprLoop>("loop {}");
testing::roundtrip::<ast::ExprLoop>("loop { 1; }");
testing::roundtrip::<ast::ExprLoop>("'label: loop {1;}");
testing::roundtrip::<ast::ExprLoop>("#[attr] 'label: loop {x();}");

Fields

attributes: Vec<Attribute>

The attributes for the loop

label: Option<(Label, Colon)>

A label followed by a colon.

loop_token: Loop

The loop keyword.

body: Box<Block>

The body of the loop.

Implementations

impl ExprLoop[src]

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

Parse #ident and attach the given meta

Trait Implementations

impl Clone for ExprLoop[src]

impl Debug for ExprLoop[src]

impl Eq for ExprLoop[src]

impl Parse for ExprLoop[src]

impl PartialEq<ExprLoop> for ExprLoop[src]

impl Spanned for ExprLoop[src]

impl StructuralEq for ExprLoop[src]

impl StructuralPartialEq for ExprLoop[src]

impl ToTokens for ExprLoop[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.