Struct rustc_hir::TraitRef [−][src]
Expand description
References to traits in impls.
resolve maps each TraitRef’s ref_id to its defining trait; that’s all
that the ref_id is for. Note that ref_id’s value is not the HirId of the
trait being referred to but just a unique HirId that serves as a key
within the resolution map.
Fields
path: &'hir Path<'hir>hir_ref_id: HirIdImplementations
impl TraitRef<'_>[src]
impl TraitRef<'_>[src]pub fn trait_def_id(&self) -> Option<DefId>[src]
pub fn trait_def_id(&self) -> Option<DefId>[src]Gets the DefId of the referenced trait. It must actually be a trait or trait alias.
Trait Implementations
impl<'hir, __CTX> HashStable<__CTX> for TraitRef<'hir> where
__CTX: HashStableContext, [src]
impl<'hir, __CTX> HashStable<__CTX> for TraitRef<'hir> where
__CTX: HashStableContext, [src]fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)[src]
Auto Trait Implementations
impl<'hir> RefUnwindSafe for TraitRef<'hir>
impl<'hir> !Send for TraitRef<'hir>
impl<'hir> !Sync for TraitRef<'hir>
impl<'hir> Unpin for TraitRef<'hir>
impl<'hir> UnwindSafe for TraitRef<'hir>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more