Struct rustc_hir::definitions::DefPath
source · pub struct DefPath {
pub data: Vec<DisambiguatedDefPathData>,
pub krate: CrateNum,
}
Fields§
§data: Vec<DisambiguatedDefPathData>
The path leading from the crate root to the item.
krate: CrateNum
The crate root this path is relative to.
Implementations§
source§impl DefPath
impl DefPath
pub fn make<FN>(krate: CrateNum, start_index: DefIndex, get_key: FN) -> DefPathwhere
FN: FnMut(DefIndex) -> DefKey,
sourcepub fn to_string_no_crate_verbose(&self) -> String
pub fn to_string_no_crate_verbose(&self) -> String
Returns a string representation of the DefPath
without
the crate-prefix. This method is useful if you don’t have
a TyCtxt
available.
sourcepub fn to_filename_friendly_no_crate(&self) -> String
pub fn to_filename_friendly_no_crate(&self) -> String
Returns a filename-friendly string of the DefPath
, without
the crate-prefix. This method is useful if you don’t have
a TyCtxt
available.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DefPath
impl Send for DefPath
impl Sync for DefPath
impl Unpin for DefPath
impl UnwindSafe for DefPath
Blanket Implementations§
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: 32 bytes