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: CrateNumThe crate root this path is relative to.
Implementations
sourceimpl DefPath
impl DefPath
pub fn make<FN>(krate: CrateNum, start_index: DefIndex, get_key: FN) -> DefPath where
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. 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