[−][src]Struct rune::ast::LitObject
A number literal.
Fields
ident: LitObjectIdent
An object identifier.
open: OpenBrace
The open bracket.
assignments: Vec<LitObjectFieldAssign>
Items in the object declaration.
close: CloseBrace
The close bracket.
Implementations
impl LitObject
[src]
pub fn span(&self) -> Span
[src]
Access the span of the expression.
pub fn is_const(&self) -> bool
[src]
Test if the entire expression is constant.
pub fn parse_with_ident(
parser: &mut Parser<'_>,
ident: LitObjectIdent
) -> Result<Self, ParseError>
[src]
parser: &mut Parser<'_>,
ident: LitObjectIdent
) -> Result<Self, ParseError>
Parse a literal object with the given path.
Trait Implementations
impl Clone for LitObject
[src]
impl Debug for LitObject
[src]
impl Parse for LitObject
[src]
Parse an object literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitObject>("Foo {\"foo\": 42}").unwrap(); parse_all::<ast::LitObject>("#{\"foo\": 42}").unwrap(); parse_all::<ast::LitObject>("#{\"foo\": 42,}").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for LitObject
impl Send for LitObject
impl Sync for LitObject
impl Unpin for LitObject
impl UnwindSafe for LitObject
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,