Struct rustc_typeck::hir::map::Definitions
[−]
[src]
pub struct Definitions { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (
rustc_private
)The definition table containing node definitions. It holds the DefPathTable for local DefIds/DefPaths and it also stores a mapping from NodeIds to local DefIds.
Methods
impl Definitions
[src]
fn new() -> Definitions
🔬 This is a nightly-only experimental API. (
rustc_private
)Create new empty definition map.
fn def_path_table(&self) -> &DefPathTable
🔬 This is a nightly-only experimental API. (
rustc_private
)fn len(&self) -> usize
🔬 This is a nightly-only experimental API. (
rustc_private
)Get the number of definitions.
fn def_key(&self, index: DefIndex) -> DefKey
🔬 This is a nightly-only experimental API. (
rustc_private
)fn def_index_for_def_key(&self, key: DefKey) -> Option<DefIndex>
🔬 This is a nightly-only experimental API. (
rustc_private
)fn def_path(&self, index: DefIndex) -> DefPath
🔬 This is a nightly-only experimental API. (
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>
🔬 This is a nightly-only experimental API. (
rustc_private
)fn opt_local_def_id(&self, node: NodeId) -> Option<DefId>
🔬 This is a nightly-only experimental API. (
rustc_private
)fn local_def_id(&self, node: NodeId) -> DefId
🔬 This is a nightly-only experimental API. (
rustc_private
)fn as_local_node_id(&self, def_id: DefId) -> Option<NodeId>
🔬 This is a nightly-only experimental API. (
rustc_private
)fn create_def_with_parent(&mut self,
parent: Option<DefIndex>,
node_id: NodeId,
data: DefPathData)
-> DefIndex
parent: Option<DefIndex>,
node_id: NodeId,
data: DefPathData)
-> DefIndex
🔬 This is a nightly-only experimental API. (
rustc_private
)Add a definition with a parent definition.
Trait 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