pub struct GenericPredicates<'db> { /* private fields */ }Implementations§
Source§impl<'db> GenericPredicates<'db>
impl<'db> GenericPredicates<'db>
Sourcepub fn query_with_diagnostics(
db: &'db dyn HirDatabase,
def: GenericDefId,
) -> &'db (GenericPredicates<'db>, Option<ThinArc<(), TyLoweringDiagnostic>>)
pub fn query_with_diagnostics( db: &'db dyn HirDatabase, def: GenericDefId, ) -> &'db (GenericPredicates<'db>, Option<ThinArc<(), TyLoweringDiagnostic>>)
Resolve the where clause(s) of an item with generics.
Diagnostics are computed only for this item’s predicates, not for parents.
Source§impl<'db> GenericPredicates<'db>
impl<'db> GenericPredicates<'db>
pub fn query( db: &'db dyn HirDatabase, def: GenericDefId, ) -> &'db GenericPredicates<'db>
pub fn query_all( db: &'db dyn HirDatabase, def: GenericDefId, ) -> EarlyBinder<'db, &'db [Clause<'db>]>
pub fn query_own( db: &'db dyn HirDatabase, def: GenericDefId, ) -> EarlyBinder<'db, &'db [Clause<'db>]>
pub fn query_explicit( db: &'db dyn HirDatabase, def: GenericDefId, ) -> EarlyBinder<'db, &'db [Clause<'db>]>
pub fn all_predicates(&self) -> EarlyBinder<'db, &[Clause<'db>]>
pub fn own_predicates(&self) -> EarlyBinder<'db, &[Clause<'db>]>
Sourcepub fn explicit_predicates(&self) -> EarlyBinder<'db, &[Clause<'db>]>
pub fn explicit_predicates(&self) -> EarlyBinder<'db, &[Clause<'db>]>
Returns the predicates, minus the implicit Self: Trait predicate for a trait.
Trait Implementations§
Source§impl<'db> Clone for GenericPredicates<'db>
impl<'db> Clone for GenericPredicates<'db>
Source§fn clone(&self) -> GenericPredicates<'db>
fn clone(&self) -> GenericPredicates<'db>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'db> Debug for GenericPredicates<'db>
impl<'db> Debug for GenericPredicates<'db>
Source§impl<'db> Hash for GenericPredicates<'db>
impl<'db> Hash for GenericPredicates<'db>
Source§impl<'db> PartialEq for GenericPredicates<'db>
impl<'db> PartialEq for GenericPredicates<'db>
impl<'db> Eq for GenericPredicates<'db>
impl<'db> StructuralPartialEq for GenericPredicates<'db>
Auto Trait Implementations§
impl<'db> Freeze for GenericPredicates<'db>
impl<'db> RefUnwindSafe for GenericPredicates<'db>
impl<'db> Send for GenericPredicates<'db>
impl<'db> Sync for GenericPredicates<'db>
impl<'db> Unpin for GenericPredicates<'db>
impl<'db> UnwindSafe for GenericPredicates<'db>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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.§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<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