Enum rustc_resolve::imports::ImportKind
source · pub(crate) enum ImportKind<'a> {
Single {
source: Ident,
target: Ident,
source_bindings: PerNS<Cell<Result<Interned<'a, NameBindingData<'a>>, Determinacy>>>,
target_bindings: PerNS<Cell<Option<Interned<'a, NameBindingData<'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<Interned<'a, NameBindingData<'a>>, Determinacy>>>
Bindings to which source
refers to.
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§
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
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