Struct rustc_hir::definitions::DefPathTable [−][src]
pub struct DefPathTable {
index_to_key: IndexVec<DefIndex, DefKey>,
def_path_hashes: IndexVec<DefIndex, DefPathHash>,
def_path_hash_to_index: UnhashMap<DefPathHash, DefIndex>,
}Expand description
The DefPathTable maps DefIndexes to DefKeys and vice versa.
Internally the DefPathTable holds a tree of DefKeys, where each DefKey
stores the DefIndex of its parent.
There is one DefPathTable for each crate.
Fields
index_to_key: IndexVec<DefIndex, DefKey>def_path_hashes: IndexVec<DefIndex, DefPathHash>def_path_hash_to_index: UnhashMap<DefPathHash, DefIndex>Implementations
pub fn enumerated_keys_and_path_hashes(
&self
) -> impl Iterator<Item = (DefIndex, &DefKey, &DefPathHash)> + '_Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for DefPathTableimpl Send for DefPathTableimpl Sync for DefPathTableimpl Unpin for DefPathTableimpl UnwindSafe for DefPathTableBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 80 bytes