Struct rune::ast::ExprObject[][src]

pub struct ExprObject {
    pub attributes: Vec<Attribute>,
    pub ident: ObjectIdent,
    pub assignments: Braced<FieldAssign, Comma>,
}

Parse an object expression.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::ExprObject>("Foo {\"foo\": 42}");
testing::roundtrip::<ast::ExprObject>("#{\"foo\": 42}");
testing::roundtrip::<ast::ExprObject>("#{\"foo\": 42,}");

Fields

attributes: Vec<Attribute>

Attributes associated with object.

ident: ObjectIdent

An object identifier.

assignments: Braced<FieldAssign, Comma>

Assignments in the object.

Implementations

impl ExprObject[src]

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

Parse #ident and attach the given meta

Trait Implementations

impl Clone for ExprObject[src]

impl Debug for ExprObject[src]

impl Eq for ExprObject[src]

impl Parse for ExprObject[src]

impl PartialEq<ExprObject> for ExprObject[src]

impl Peek for ExprObject[src]

impl Spanned for ExprObject[src]

impl StructuralEq for ExprObject[src]

impl StructuralPartialEq for ExprObject[src]

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