Struct rune::ast::ItemUse[][src]

pub struct ItemUse {
    pub attributes: Vec<Attribute>,
    pub visibility: Visibility,
    pub use_token: Use,
    pub path: ItemUsePath,
}

A use item.

Examples

use rune::{testing, ast};

testing::roundtrip::<ast::ItemUse>("use foo");
testing::roundtrip::<ast::ItemUse>("use foo::bar");
testing::roundtrip::<ast::ItemUse>("use foo::bar::baz");
testing::roundtrip::<ast::ItemUse>("#[macro_use] use foo::bar::baz");
testing::roundtrip::<ast::ItemUse>("#[macro_use] pub(crate) use foo::bar::baz");

Fields

attributes: Vec<Attribute>

The attributes on use item

visibility: Visibility

The visibility of the use item

use_token: Use

The use token.

path: ItemUsePath

Item path.

Implementations

impl ItemUse[src]

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

Parse #ident and attach the given meta

Trait Implementations

impl Clone for ItemUse[src]

impl Debug for ItemUse[src]

impl Eq for ItemUse[src]

impl Parse for ItemUse[src]

impl PartialEq<ItemUse> for ItemUse[src]

impl Spanned for ItemUse[src]

impl StructuralEq for ItemUse[src]

impl StructuralPartialEq for ItemUse[src]

impl ToTokens for ItemUse[src]

Auto Trait Implementations

impl RefUnwindSafe for ItemUse

impl Send for ItemUse

impl Sync for ItemUse

impl Unpin for ItemUse

impl UnwindSafe for ItemUse

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.