Enum rustc_resolve::imports::ImportKind [−][src]
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,
}Expand description
Contains data for specific kinds of imports.
Variants
Show fields
Fields of Single
source: IdentExpand description
source in use prefix::source as target.
target: IdentExpand description
target in use prefix::source as target.
source_bindings: PerNS<Cell<Result<&'a NameBinding<'a>, Determinacy>>>Expand description
Bindings to which source refers to.
target_bindings: PerNS<Cell<Option<&'a NameBinding<'a>>>>Expand description
Bindings introduced by target.
type_ns_only: boolExpand description
true for ...::{self [as target]} imports, false otherwise.
nested: boolExpand description
Did this import result from a nested import? ie. use foo::{bar, baz};
Show fields
Fields of Glob
is_prelude: boolmax_vis: Cell<Visibility>Trait Implementations
impl<'a> Clone for ImportKind<'a>[src]
impl<'a> Clone for ImportKind<'a>[src]fn clone(&self) -> ImportKind<'a>[src]
fn clone(&self) -> ImportKind<'a>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more