[−][src]Enum rustc_resolve::imports::ImportKind

pub enum ImportKind<'a> {
    Single {
        source: Ident,
        target: Ident,
        source_bindings: PerNS<Cell<Result<&'a NameBinding<'a>, Determinacy>>>,
        target_bindings: PerNS<Cell<Option<&'a NameBinding<'a>>>>,
        type_ns_only: bool,
        nested: bool,
    },
    Glob {
        is_prelude: bool,
        max_vis: Cell<Visibility>,
    },
    ExternCrate {
        source: Option<Symbol>,
        target: Ident,
    },
    MacroUse,
}

Contains data for specific kinds of imports.

Variants

Single

Fields of Single

source: Ident

source in use prefix::source as target.

target: Ident

target in use prefix::source as target.

source_bindings: PerNS<Cell<Result<&'a NameBinding<'a>, Determinacy>>>

Bindings to which source refers to.

target_bindings: PerNS<Cell<Option<&'a NameBinding<'a>>>>

Bindings introduced by target.

type_ns_only: bool

true for ...::{self [as target]} imports, false otherwise.

nested: bool

Did this import result from a nested import? ie. use foo::{bar, baz};

Glob

Fields of Glob

is_prelude: boolmax_vis: Cell<Visibility>
ExternCrate

Fields of ExternCrate

source: Option<Symbol>target: Ident
MacroUse

Trait Implementations

impl<'a> Clone for ImportKind<'a>[src]

impl<'a> Debug for ImportKind<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for ImportKind<'a>

impl<'a> !Send for ImportKind<'a>

impl<'a> !Sync for ImportKind<'a>

impl<'a> Unpin for ImportKind<'a>

impl<'a> !UnwindSafe for ImportKind<'a>

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.