Struct TraitImpls
pub struct TraitImpls { /* private fields */ }Implementations§
§impl TraitImpls
impl TraitImpls
pub fn for_crate( db: &(dyn HirDatabase + 'static), krate: Crate, ) -> &Arc<TraitImpls>
pub fn for_block( db: &(dyn HirDatabase + 'static), block: BlockId, ) -> &Option<Box<TraitImpls>>
pub fn for_crate_and_deps( db: &(dyn HirDatabase + 'static), krate: Crate, ) -> &Box<[Arc<TraitImpls>]>
§impl TraitImpls
impl TraitImpls
pub fn blanket_impls(&self, for_trait: TraitId) -> &[ImplId]
pub fn has_impls_for_trait_and_self_ty(
&self,
trait_: TraitId,
self_ty: &SimplifiedType<SolverDefId>,
) -> bool
pub fn has_impls_for_trait_and_self_ty( &self, trait_: TraitId, self_ty: &SimplifiedType<SolverDefId>, ) -> bool
Queries whether self_ty has potentially applicable implementations of trait_.
pub fn for_trait_and_self_ty( &self, trait_: TraitId, self_ty: &SimplifiedType<SolverDefId>, ) -> &[ImplId]
pub fn for_trait(&self, trait_: TraitId, callback: impl FnMut(&[ImplId]))
pub fn for_self_ty( &self, self_ty: &SimplifiedType<SolverDefId>, callback: impl FnMut(&[ImplId]), )
pub fn for_each_crate_and_block( db: &(dyn HirDatabase + 'static), krate: Crate, block: Option<BlockId>, for_each: &mut dyn FnMut(&TraitImpls), )
pub fn for_each_crate_and_block_trait_and_type(
db: &(dyn HirDatabase + 'static),
krate: Crate,
type_block: Option<BlockId>,
trait_block: Option<BlockId>,
for_each: &mut dyn FnMut(&TraitImpls),
)
pub fn for_each_crate_and_block_trait_and_type( db: &(dyn HirDatabase + 'static), krate: Crate, type_block: Option<BlockId>, trait_block: Option<BlockId>, for_each: &mut dyn FnMut(&TraitImpls), )
Like Self::for_each_crate_and_block(), but takes in account two blocks, one for a trait and one for a self type.
Trait Implementations§
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<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more