Struct rustc::hir::map::definitions::Definitions [] [src]

pub struct Definitions {
    // some fields omitted
}
Unstable (rustc_private)

The definition table containing node definitions

Methods

impl Definitions
[src]

fn new() -> Definitions

Unstable (rustc_private)

Create new empty definition map.

fn len(&self) -> usize

Unstable (rustc_private)

Get the number of definitions.

fn def_key(&self, index: DefIndex) -> DefKey

fn def_index_for_def_key(&self, key: DefKey) -> Option<DefIndex>

fn def_path(&self, index: DefIndex) -> DefPath

Unstable (rustc_private)

Returns the path from the crate root to index. The root nodes are not included in the path (i.e., this will be an empty vector for the crate root). For an inlined item, this will be the path of the item in the external crate (but the path will begin with the path to the external crate).

fn opt_def_index(&self, node: NodeId) -> Option<DefIndex>

fn opt_local_def_id(&self, node: NodeId) -> Option<DefId>

fn local_def_id(&self, node: NodeId) -> DefId

fn as_local_node_id(&self, def_id: DefId) -> Option<NodeId>

fn create_def_with_parent(&mut self, parent: Option<DefIndex>, node_id: NodeId, data: DefPathData) -> DefIndex

Unstable (rustc_private)

Add a definition with a parent definition.

Trait Implementations

Derived Implementations

impl Clone for Definitions
[src]

fn clone(&self) -> Definitions

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more