Struct rustc_resolve::resolve_imports::ImportDirective [−][src]
pub struct ImportDirective<'a> {
pub id: NodeId,
pub root_id: NodeId,
pub span: Span,
pub root_span: Span,
pub parent: &'a ModuleData<'a>,
pub module_path: Vec<Ident>,
pub imported_module: Cell<Option<&'a ModuleData<'a>>>,
pub subclass: ImportDirectiveSubclass<'a>,
pub vis: Cell<Visibility>,
pub expansion: Mark,
pub used: Cell<bool>,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
One import directive.
Fields
id: NodeId
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
The id of the extern crate, UseTree etc that imported this ImportDirective.
In the case where the ImportDirective was expanded from a "nested" use tree,
this id is the id of the leaf tree. For example:
use foo::bar::{a, b}
If this is the import directive for foo::bar::a, we would have the id of the UseTree
for a in this field.
root_id: NodeId
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
The id of the "root" use-kind -- this is always the same as
id except in the case of "nested" use trees, in which case
it will be the id of the root use tree. e.g., in the example
from id, this would be the id of the use foo::bar
UseTree node.
span: Span
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Span of this use tree.
root_span: Span
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Span of the root use tree (see root_id).
parent: &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
module_path: Vec<Ident>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
imported_module: Cell<Option<&'a ModuleData<'a>>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
subclass: ImportDirectiveSubclass<'a>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
vis: Cell<Visibility>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
expansion: Mark
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
used: Cell<bool>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'a> ImportDirective<'a>[src]
impl<'a> ImportDirective<'a>pub fn is_glob(&self) -> bool[src]
pub fn is_glob(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub(crate) fn crate_lint(&self) -> CrateLint[src]
pub(crate) fn crate_lint(&self) -> CrateLint🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'a> Debug for ImportDirective<'a>[src]
impl<'a> Debug for ImportDirective<'a>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a> Clone for ImportDirective<'a>[src]
impl<'a> Clone for ImportDirective<'a>fn clone(&self) -> ImportDirective<'a>[src]
fn clone(&self) -> ImportDirective<'a>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)Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<'a> !Send for ImportDirective<'a>
impl<'a> !Send for ImportDirective<'a>impl<'a> !Sync for ImportDirective<'a>
impl<'a> !Sync for ImportDirective<'a>