#[non_exhaustive]pub struct ItemUsePath {
pub global: Option<ColonColon>,
pub first: ItemUseSegment,
pub segments: Vec<(ColonColon, ItemUseSegment)>,
pub alias: Option<(As, Ident)>,
}
Expand description
A single use declaration path.
foo::bar::{baz::*, biz}
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.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§
Source§impl Debug for ItemUsePath
impl Debug for ItemUsePath
Source§impl OptionSpanned for ItemUsePath
impl OptionSpanned for ItemUsePath
Source§fn option_span(&self) -> Option<Span>
fn option_span(&self) -> Option<Span>
Get the optional span of the type.
Source§impl Parse for ItemUsePath
impl Parse for ItemUsePath
Source§impl PartialEq for ItemUsePath
impl PartialEq for ItemUsePath
Source§impl ToTokens for ItemUsePath
impl ToTokens for ItemUsePath
Source§fn to_tokens(
&self,
context: &mut MacroContext<'_, '_, '_>,
stream: &mut TokenStream,
) -> Result<()>
fn to_tokens( &self, context: &mut MacroContext<'_, '_, '_>, stream: &mut TokenStream, ) -> Result<()>
Turn the current item into tokens.
Source§impl TryClone for ItemUsePath
impl TryClone for ItemUsePath
impl Eq for ItemUsePath
impl StructuralPartialEq for ItemUsePath
Auto Trait Implementations§
impl Freeze for ItemUsePath
impl RefUnwindSafe for ItemUsePath
impl Send for ItemUsePath
impl Sync for ItemUsePath
impl Unpin for ItemUsePath
impl UnwindSafe for ItemUsePath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.