Struct rune::ast::LitNumber[][src]

pub struct LitNumber {
    pub token: Token,
    pub source: NumberSource,
}

A number literal.

Fields

token: Token

The token corresponding to the literal.

source: NumberSource

The source of the number.

Trait Implementations

impl Clone for LitNumber[src]

impl Debug for LitNumber[src]

impl Eq for LitNumber[src]

impl Parse for LitNumber[src]

Parse a number literal.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::LitNumber>("42");
testing::roundtrip::<ast::LitNumber>("42.42");
testing::roundtrip::<ast::LitNumber>("0.42");
testing::roundtrip::<ast::LitNumber>("0.42e10");

impl PartialEq<LitNumber> for LitNumber[src]

impl<'a> Resolve<'a> for LitNumber[src]

type Output = Number

The output type being resolved into.

impl ResolveOwned for LitNumber[src]

type Owned = Number

The output type being resolved into.

impl Spanned for LitNumber[src]

impl StructuralEq for LitNumber[src]

impl StructuralPartialEq for LitNumber[src]

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