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]
impl DefPath
pub fn is_local(&self) -> bool
[src]
pub fn is_local(&self) -> bool
🔬 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]
pub fn make<FN>(krate: CrateNum, start_index: DefIndex, get_key: FN) -> DefPath where
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]
pub fn to_string_no_crate(&self) -> String
🔬 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]
pub fn to_filename_friendly_no_crate(&self) -> String
🔬 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]
impl Clone for DefPath
fn clone(&self) -> DefPath
[src]
fn clone(&self) -> DefPath
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for DefPath
[src]
impl Debug for DefPath
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for DefPath
[src]
impl Hash for DefPath
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Encodable for DefPath
[src]
impl Encodable for DefPath
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
🔬 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?
impl Decodable for DefPath
[src]
impl Decodable for DefPath