[−][src]Struct rune::ast::ItemUse
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]
parser: &mut Parser<'_>,
attributes: Vec<Attribute>,
visibility: Visibility
) -> Result<Self, ParseError>
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]
pub fn parse(p: &mut Parser<'_>) -> Result<Self, ParseError>
[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]
pub fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ItemUse
[src]
impl Send for ItemUse
[src]
impl Sync for ItemUse
[src]
impl Unpin for ItemUse
[src]
impl UnwindSafe for ItemUse
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,