Struct rustc::hir::map::definitions::DefPath
[−]
[src]
pub struct DefPath {
pub data: Vec<DisambiguatedDefPathData>,
pub krate: CrateNum,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
data: Vec<DisambiguatedDefPathData>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
the path leading from the crate root to the item
krate: CrateNum
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
what krate root is this path relative to?
Methods
impl DefPath[src]
pub fn is_local(&self) -> bool[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn make<FN>(krate: CrateNum, start_index: DefIndex, get_key: FN) -> DefPath where
FN: FnMut(DefIndex) -> DefKey, [src]
FN: FnMut(DefIndex) -> DefKey,
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn to_string_no_crate(&self) -> String[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Returns a string representation of the DefPath without the crate-prefix. This method is useful if you don't have a TyCtxt available.
pub fn to_filename_friendly_no_crate(&self) -> String[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Return filename friendly string of the DefPah without the crate-prefix. This method is useful if you don't have a TyCtxt available.
Trait Implementations
impl Clone for DefPath[src]
fn clone(&self) -> DefPath[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for DefPath[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for DefPath[src]
fn eq(&self, __arg_0: &DefPath) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &DefPath) -> bool[src]
This method tests for !=.
impl Eq for DefPath[src]
impl Hash for DefPath[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl Encodable for DefPath[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?