pub struct GenericPredicates {
predicates: StoredEarlyBinder<StoredClauses>,
has_trait_implied_predicate: bool,
parent_explicit_self_predicates_start: u32,
own_predicates_start: u32,
own_assoc_ty_bounds_start: u32,
}Fields§
§predicates: StoredEarlyBinder<StoredClauses>§has_trait_implied_predicate: bool§parent_explicit_self_predicates_start: u32§own_predicates_start: u32§own_assoc_ty_bounds_start: u32Implementations§
Source§impl<'db> GenericPredicates
impl<'db> GenericPredicates
Sourcepub fn query_with_diagnostics(
db: &'db dyn HirDatabase,
def: GenericDefId,
) -> &'db TyLoweringResult<'db, GenericPredicates>
pub fn query_with_diagnostics( db: &'db dyn HirDatabase, def: GenericDefId, ) -> &'db TyLoweringResult<'db, GenericPredicates>
Resolve the where clause(s) of an item with generics.
Diagnostics are computed only for this item’s predicates, not for parents.
Source§impl GenericPredicates
impl GenericPredicates
pub fn empty() -> &'static GenericPredicates
pub(crate) fn from_explicit_own_predicates( predicates: StoredEarlyBinder<StoredClauses>, ) -> Self
pub fn query(db: &dyn HirDatabase, def: GenericDefId) -> &GenericPredicates
pub fn query_all<'db>( db: &'db dyn HirDatabase, def: GenericDefId, ) -> EarlyBinder<'db, impl Iterator<Item = Clause<'db>>>
pub fn query_own_explicit<'db>( db: &'db dyn HirDatabase, def: GenericDefId, ) -> EarlyBinder<'db, impl Iterator<Item = Clause<'db>>>
pub fn query_explicit<'db>( db: &'db dyn HirDatabase, def: GenericDefId, ) -> EarlyBinder<'db, impl Iterator<Item = Clause<'db>>>
pub fn all_predicates( &self, ) -> EarlyBinder<'_, impl Iterator<Item = Clause<'_>>>
pub fn own_explicit_predicates( &self, ) -> EarlyBinder<'_, impl Iterator<Item = Clause<'_>>>
pub fn explicit_predicates( &self, ) -> EarlyBinder<'_, impl Iterator<Item = Clause<'_>>>
pub fn explicit_non_assoc_types_predicates( &self, ) -> EarlyBinder<'_, impl Iterator<Item = Clause<'_>>>
pub fn explicit_assoc_types_predicates( &self, ) -> EarlyBinder<'_, impl Iterator<Item = Clause<'_>>>
Trait Implementations§
Source§impl Clone for GenericPredicates
impl Clone for GenericPredicates
Source§fn clone(&self) -> GenericPredicates
fn clone(&self) -> GenericPredicates
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenericPredicates
impl Debug for GenericPredicates
Source§impl Hash for GenericPredicates
impl Hash for GenericPredicates
Source§impl PartialEq for GenericPredicates
impl PartialEq for GenericPredicates
Source§fn eq(&self, other: &GenericPredicates) -> bool
fn eq(&self, other: &GenericPredicates) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GenericPredicates
impl StructuralPartialEq for GenericPredicates
Auto Trait Implementations§
impl Freeze for GenericPredicates
impl RefUnwindSafe for GenericPredicates
impl Send for GenericPredicates
impl Sync for GenericPredicates
impl Unpin for GenericPredicates
impl UnsafeUnpin for GenericPredicates
impl UnwindSafe for GenericPredicates
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
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<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> HashEqLike<T> for T
impl<T> HashEqLike<T> 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