Struct rune::ast::ItemUsePath [−][src]
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]
fn clone(&self) -> ItemUsePath
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ItemUsePath
[src]
impl Eq for ItemUsePath
[src]
impl Parse for ItemUsePath
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<ItemUsePath> for ItemUsePath
[src]
fn eq(&self, other: &ItemUsePath) -> bool
[src]
fn ne(&self, other: &ItemUsePath) -> bool
[src]
impl Spanned for ItemUsePath
[src]
impl StructuralEq for ItemUsePath
[src]
impl StructuralPartialEq for ItemUsePath
[src]
impl ToTokens for ItemUsePath
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ItemUsePath
impl Send for ItemUsePath
impl Sync for ItemUsePath
impl Unpin for ItemUsePath
impl UnwindSafe for ItemUsePath
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>,