pub enum InferBodyId<'db> {
DefWithBodyId(DefWithBodyId),
AnonConstId(AnonConstId<'db>),
}Expand description
A [DefWithBodyId], or an anon const.
Variants§
DefWithBodyId(DefWithBodyId)
AnonConstId(AnonConstId<'db>)
Implementations§
Source§impl<'db> InferBodyId<'db>
impl<'db> InferBodyId<'db>
pub fn borrowck( self, db: &'db dyn HirDatabase, ) -> Result<&'db [BorrowckResult<'db>], MirLowerError<'db>>
Source§impl InferBodyId<'_>
impl InferBodyId<'_>
pub fn expression_store_owner( self, db: &dyn HirDatabase, ) -> ExpressionStoreOwnerId
pub fn generic_def(self, db: &dyn HirDatabase) -> GenericDefId
pub fn as_function(self) -> Option<FunctionId>
pub fn as_variant(self) -> Option<EnumVariantId>
pub fn store_and_root_expr( self, db: &dyn HirDatabase, ) -> (&ExpressionStore, ExprId)
Trait Implementations§
Source§impl<'db> Clone for InferBodyId<'db>
impl<'db> Clone for InferBodyId<'db>
Source§fn clone(&self) -> InferBodyId<'db>
fn clone(&self) -> InferBodyId<'db>
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<'db> Debug for InferBodyId<'db>
impl<'db> Debug for InferBodyId<'db>
Source§impl<'db> From<AnonConstId<'db>> for InferBodyId<'db>
impl<'db> From<AnonConstId<'db>> for InferBodyId<'db>
Source§fn from(it: AnonConstId<'db>) -> InferBodyId<'db>
fn from(it: AnonConstId<'db>) -> InferBodyId<'db>
Converts to this type from the input type.
Source§impl<'db> From<ConstId> for InferBodyId<'db>
impl<'db> From<ConstId> for InferBodyId<'db>
Source§fn from(it: ConstId) -> InferBodyId<'db>
fn from(it: ConstId) -> InferBodyId<'db>
Converts to this type from the input type.
Source§impl<'db> From<DefWithBodyId> for InferBodyId<'db>
impl<'db> From<DefWithBodyId> for InferBodyId<'db>
Source§fn from(it: DefWithBodyId) -> InferBodyId<'db>
fn from(it: DefWithBodyId) -> InferBodyId<'db>
Converts to this type from the input type.
Source§impl<'db> From<EnumVariantId> for InferBodyId<'db>
impl<'db> From<EnumVariantId> for InferBodyId<'db>
Source§impl<'db> From<FunctionId> for InferBodyId<'db>
impl<'db> From<FunctionId> for InferBodyId<'db>
Source§fn from(it: FunctionId) -> InferBodyId<'db>
fn from(it: FunctionId) -> InferBodyId<'db>
Converts to this type from the input type.
Source§impl<'db> From<InferBodyId<'db>> for SolverDefId<'db>
impl<'db> From<InferBodyId<'db>> for SolverDefId<'db>
Source§fn from(value: InferBodyId<'db>) -> Self
fn from(value: InferBodyId<'db>) -> Self
Converts to this type from the input type.
Source§impl<'db> From<StaticId> for InferBodyId<'db>
impl<'db> From<StaticId> for InferBodyId<'db>
Source§fn from(it: StaticId) -> InferBodyId<'db>
fn from(it: StaticId) -> InferBodyId<'db>
Converts to this type from the input type.
Source§impl<'db> FromIdWithDb for InferBodyId<'db>
impl<'db> FromIdWithDb for InferBodyId<'db>
Source§impl HasModule for InferBodyId<'_>
impl HasModule for InferBodyId<'_>
Source§impl HasResolver for InferBodyId<'_>
impl HasResolver for InferBodyId<'_>
Source§impl<'db> Hash for InferBodyId<'db>
impl<'db> Hash for InferBodyId<'db>
Source§impl<'db> Ord for InferBodyId<'db>
impl<'db> Ord for InferBodyId<'db>
Source§fn cmp(&self, other: &InferBodyId<'db>) -> Ordering
fn cmp(&self, other: &InferBodyId<'db>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'db> PartialEq for InferBodyId<'db>
impl<'db> PartialEq for InferBodyId<'db>
Source§fn eq(&self, other: &InferBodyId<'db>) -> bool
fn eq(&self, other: &InferBodyId<'db>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'db> PartialOrd for InferBodyId<'db>
impl<'db> PartialOrd for InferBodyId<'db>
Source§impl<'db> SalsaStructInDb for InferBodyId<'db>
impl<'db> SalsaStructInDb for InferBodyId<'db>
Source§const LEAF_TYPE_IDS: &'static [ConstTypeId]
const LEAF_TYPE_IDS: &'static [ConstTypeId]
The type IDs of all concrete (leaf) salsa struct types that this type can contain. Read more
type MemoIngredientMap = MemoIngredientIndices
Source§fn lookup_ingredient_index(__zalsa: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(__zalsa: &Zalsa) -> IngredientIndices
Lookup or create ingredient indices. Read more
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Returns the IDs of any instances of this struct in the database.
Source§fn cast(id: Id, type_id: TypeId) -> Option<Self>
fn cast(id: Id, type_id: TypeId) -> Option<Self>
Plumbing to support nested salsa supertypes. Read more
Source§unsafe fn memo_table(
zalsa: &Zalsa,
id: Id,
current_revision: Revision,
) -> MemoTableWithTypes<'_>
unsafe fn memo_table( zalsa: &Zalsa, id: Id, current_revision: Revision, ) -> MemoTableWithTypes<'_>
Return the memo table associated with
id. Read moreSource§impl<'db> TryFrom<SolverDefId<'db>> for InferBodyId<'db>
impl<'db> TryFrom<SolverDefId<'db>> for InferBodyId<'db>
Source§impl<'db> Update for InferBodyId<'db>
impl<'db> Update for InferBodyId<'db>
impl<'db> Copy for InferBodyId<'db>
impl<'db> Eq for InferBodyId<'db>
impl<'db> StructuralPartialEq for InferBodyId<'db>
Auto Trait Implementations§
impl<'db> Freeze for InferBodyId<'db>
impl<'db> RefUnwindSafe for InferBodyId<'db>
impl<'db> Send for InferBodyId<'db>
impl<'db> Sync for InferBodyId<'db>
impl<'db> Unpin for InferBodyId<'db>
impl<'db> UnsafeUnpin for InferBodyId<'db>
impl<'db> UnwindSafe for InferBodyId<'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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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