Struct hir_ty::method_resolution::TraitImpls
source · pub struct TraitImpls { /* private fields */ }
Expand description
Trait impls defined or available in some crate.
Implementations§
source§impl TraitImpls
impl TraitImpls
sourcepub fn for_self_ty_without_blanket_impls(
&self,
fp: TyFingerprint
) -> impl Iterator<Item = ImplId> + '_
pub fn for_self_ty_without_blanket_impls( &self, fp: TyFingerprint ) -> impl Iterator<Item = ImplId> + '_
Queries all trait impls for the given type.
sourcepub fn for_trait(&self, trait_: TraitId) -> impl Iterator<Item = ImplId> + '_
pub fn for_trait(&self, trait_: TraitId) -> impl Iterator<Item = ImplId> + '_
Queries all impls of the given trait.
sourcepub fn for_trait_and_self_ty(
&self,
trait_: TraitId,
self_ty: TyFingerprint
) -> impl Iterator<Item = ImplId> + '_
pub fn for_trait_and_self_ty( &self, trait_: TraitId, self_ty: TyFingerprint ) -> impl Iterator<Item = ImplId> + '_
Queries all impls of trait_
that may apply to self_ty
.
sourcepub fn has_impls_for_trait_and_self_ty(
&self,
trait_: TraitId,
self_ty: TyFingerprint
) -> bool
pub fn has_impls_for_trait_and_self_ty( &self, trait_: TraitId, self_ty: TyFingerprint ) -> bool
Queries whether self_ty
has potentially applicable implementations of trait_
.
pub fn all_impls(&self) -> impl Iterator<Item = ImplId> + '_
Trait Implementations§
source§impl Debug for TraitImpls
impl Debug for TraitImpls
source§impl PartialEq for TraitImpls
impl PartialEq for TraitImpls
source§fn eq(&self, other: &TraitImpls) -> bool
fn eq(&self, other: &TraitImpls) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TraitImpls
impl StructuralPartialEq for TraitImpls
Auto Trait Implementations§
impl Freeze for TraitImpls
impl RefUnwindSafe for TraitImpls
impl Send for TraitImpls
impl Sync for TraitImpls
impl Unpin for TraitImpls
impl UnwindSafe for TraitImpls
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.