Struct rune::ast::ExprTuple[][src]

pub struct ExprTuple {
    pub attributes: Vec<Attribute>,
    pub items: Parenthesized<Expr, Comma>,
}

An expression to construct a literal tuple.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::ExprTuple>("(1, \"two\")");
testing::roundtrip::<ast::ExprTuple>("(1, 2,)");
testing::roundtrip::<ast::ExprTuple>("(1, 2, foo())");

Fields

attributes: Vec<Attribute>

Attributes associated with tuple.

items: Parenthesized<Expr, Comma>

Items in the tuple.

Implementations

impl ExprTuple[src]

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

Parse #ident and attach the given meta

impl ExprTuple[src]

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

Start parsing literal tuple from the middle of an expression.

Trait Implementations

impl Clone for ExprTuple[src]

impl Debug for ExprTuple[src]

impl Eq for ExprTuple[src]

impl Parse for ExprTuple[src]

impl PartialEq<ExprTuple> for ExprTuple[src]

impl Spanned for ExprTuple[src]

impl StructuralEq for ExprTuple[src]

impl StructuralPartialEq for ExprTuple[src]

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