[][src]Struct ra_ap_hir_def::item_tree::Import

pub struct Import {
    pub path: ModPath,
    pub alias: Option<ImportAlias>,
    pub visibility: RawVisibilityId,
    pub is_glob: bool,
    pub is_prelude: bool,
    pub ast_id: FileAstId<Use>,
    pub index: usize,
}

A desugared use import.

Fields

path: ModPathalias: Option<ImportAlias>visibility: RawVisibilityIdis_glob: boolis_prelude: boolast_id: FileAstId<Use>

AST ID of the use or extern crate item this import was derived from. Note that many Imports can map to the same use item.

index: usize

Index of this Import when the containing Use is visited via ModPath::expand_use_item.

This can be used to get the UseTree this Import corresponds to and allows emitting precise diagnostics.

Trait Implementations

impl Clone for Import[src]

impl Debug for Import[src]

impl Eq for Import[src]

impl ItemTreeNode for Import[src]

type Source = Use

impl PartialEq<Import> for Import[src]

impl StructuralEq for Import[src]

impl StructuralPartialEq for Import[src]

Auto Trait Implementations

impl RefUnwindSafe for Import

impl Send for Import

impl Sync for Import

impl Unpin for Import

impl UnwindSafe for Import

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.