[−][src]Struct rustc_hir::hir_id::HirId
Uniquely identifies a node in the HIR of the current crate. It is
composed of the owner, which is the LocalDefId of the directly enclosing
hir::Item, hir::TraitItem, or hir::ImplItem (i.e., the closest "item-like"),
and the local_id which is unique within the given owner.
This two-level structure makes for more stable values: One can move an item
around within the source code, or add or remove stuff before it, without
the local_id part of the HirId changing, which is a very useful property in
incremental compilation where we have to persist things through changes to
the code base.
Fields
owner: LocalDefIdlocal_id: ItemLocalIdTrait Implementations
impl Clone for HirId[src]
impl Copy for HirId[src]
impl Debug for HirId[src]
impl<__D: Decoder> Decodable<__D> for HirId[src]
impl Display for HirId[src]
impl<__E: Encoder> Encodable<__E> for HirId[src]
impl Eq for HirId[src]
impl Hash for HirId[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<HirCtx: HashStableContext> HashStable<HirCtx> for HirId[src]
pub fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher)[src]
impl Ord for HirId[src]
pub fn cmp(&self, other: &HirId) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<HirId> for HirId[src]
impl PartialOrd<HirId> for HirId[src]
pub fn partial_cmp(&self, other: &HirId) -> Option<Ordering>[src]
pub fn lt(&self, other: &HirId) -> bool[src]
pub fn le(&self, other: &HirId) -> bool[src]
pub fn gt(&self, other: &HirId) -> bool[src]
pub fn ge(&self, other: &HirId) -> bool[src]
impl StructuralEq for HirId[src]
impl StructuralPartialEq for HirId[src]
impl<HirCtx: HashStableContext> ToStableHashKey<HirCtx> for HirId[src]
type KeyType = (DefPathHash, ItemLocalId)
pub fn to_stable_hash_key(&self, hcx: &HirCtx) -> (DefPathHash, ItemLocalId)[src]
Auto Trait Implementations
impl RefUnwindSafe for HirId
impl Send for HirId
impl Sync for HirId
impl Unpin for HirId
impl UnwindSafe for HirId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,