Enum rustc_resolve::imports::ImportKind
source · 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,
id: NodeId,
},
Glob {
is_prelude: bool,
max_vis: Cell<Option<Visibility>>,
id: NodeId,
},
ExternCrate {
source: Option<Symbol>,
target: Ident,
id: NodeId,
},
MacroUse,
MacroExport,
}
Expand description
Contains data for specific kinds of imports.
Variants§
Single
Fields
§
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
.
Glob
ExternCrate
MacroUse
MacroExport
Trait Implementations§
source§impl<'a> Clone for ImportKind<'a>
impl<'a> Clone for ImportKind<'a>
source§fn clone(&self) -> ImportKind<'a>
fn clone(&self) -> ImportKind<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes
Size for each variant:
Single
: 103 bytesGlob
: 11 bytesExternCrate
: 23 bytesMacroUse
: 0 bytesMacroExport
: 0 bytes