Struct rune::ast::ItemUsePath[][src]

pub struct ItemUsePath {
    pub global: Option<ColonColon>,
    pub first: ItemUseSegment,
    pub segments: Vec<(ColonColon, ItemUseSegment)>,
    pub alias: Option<(As, Ident)>,
}

A single use declaration path, like foo::bar::{baz::*, biz}.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::ItemUsePath>("crate::foo");
testing::roundtrip::<ast::ItemUsePath>("foo::bar");
testing::roundtrip::<ast::ItemUsePath>("foo::bar::{baz::*, biz}");
testing::roundtrip::<ast::ItemUsePath>("{*, bar::*}");
testing::roundtrip::<ast::ItemUsePath>("::{*, bar::*}");

Fields

global: Option<ColonColon>

Global prefix.

first: ItemUseSegment

The first use component.

segments: Vec<(ColonColon, ItemUseSegment)>

Optional segments.

alias: Option<(As, Ident)>

The alias of the import.

Trait Implementations

impl Clone for ItemUsePath[src]

impl Debug for ItemUsePath[src]

impl Eq for ItemUsePath[src]

impl Parse for ItemUsePath[src]

impl PartialEq<ItemUsePath> for ItemUsePath[src]

impl Spanned for ItemUsePath[src]

impl StructuralEq for ItemUsePath[src]

impl StructuralPartialEq for ItemUsePath[src]

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