[][src]Struct rune::ast::LitStr

pub struct LitStr { /* fields omitted */ }

A string literal.

Implementations

impl LitStr[src]

pub fn span(&self) -> Span[src]

Access the span of the expression.

Trait Implementations

impl Clone for LitStr[src]

impl Debug for LitStr[src]

impl Parse for LitStr[src]

Parse a string literal.

Examples

use rune::{ParseAll, parse_all, ast};

let item = parse_all::<ast::LitStr>("\"hello world\"")?;
assert_eq!(item.resolve()?, "hello world");

let item = parse_all::<ast::LitStr>("\"hello\\nworld\"")?;
assert_eq!(item.resolve()?, "hello\nworld");

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

type Output = Cow<'a, str>

The output type being resolved.

Auto Trait Implementations

impl RefUnwindSafe for LitStr

impl Send for LitStr

impl Sync for LitStr

impl Unpin for LitStr

impl UnwindSafe for LitStr

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,