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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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