pub enum DefWithBodyId {
FunctionId(FunctionId),
StaticId(StaticId),
ConstId(ConstId),
VariantId(EnumVariantId),
}Expand description
The defs which have a body.
Variants§
FunctionId(FunctionId)
A function body.
StaticId(StaticId)
A static item initializer.
ConstId(ConstId)
A const item initializer
VariantId(EnumVariantId)
An enum variant discrimiant
Implementations§
Source§impl DefWithBodyId
impl DefWithBodyId
pub fn generic_def(self, db: &dyn SourceDatabase) -> GenericDefId
Trait Implementations§
Source§impl Clone for DefWithBodyId
impl Clone for DefWithBodyId
Source§fn clone(&self) -> DefWithBodyId
fn clone(&self) -> DefWithBodyId
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 moreimpl Copy for DefWithBodyId
Source§impl Debug for DefWithBodyId
impl Debug for DefWithBodyId
impl Eq for DefWithBodyId
Source§impl From<ConstId> for DefWithBodyId
impl From<ConstId> for DefWithBodyId
Source§fn from(it: ConstId) -> DefWithBodyId
fn from(it: ConstId) -> DefWithBodyId
Converts to this type from the input type.
Source§impl From<DefWithBodyId> for ModuleDefId
impl From<DefWithBodyId> for ModuleDefId
Source§fn from(value: DefWithBodyId) -> Self
fn from(value: DefWithBodyId) -> Self
Converts to this type from the input type.
Source§impl From<DefWithBodyId> for ExpressionStoreOwnerId
impl From<DefWithBodyId> for ExpressionStoreOwnerId
Source§fn from(id: DefWithBodyId) -> Self
fn from(id: DefWithBodyId) -> Self
Converts to this type from the input type.
Source§impl From<EnumVariantId> for DefWithBodyId
impl From<EnumVariantId> for DefWithBodyId
Source§fn from(id: EnumVariantId) -> Self
fn from(id: EnumVariantId) -> Self
Converts to this type from the input type.
Source§impl From<FunctionId> for DefWithBodyId
impl From<FunctionId> for DefWithBodyId
Source§fn from(it: FunctionId) -> DefWithBodyId
fn from(it: FunctionId) -> DefWithBodyId
Converts to this type from the input type.
Source§impl From<StaticId> for DefWithBodyId
impl From<StaticId> for DefWithBodyId
Source§fn from(it: StaticId) -> DefWithBodyId
fn from(it: StaticId) -> DefWithBodyId
Converts to this type from the input type.
Source§impl HasModule for DefWithBodyId
impl HasModule for DefWithBodyId
Source§impl HasResolver for DefWithBodyId
impl HasResolver for DefWithBodyId
Source§impl Hash for DefWithBodyId
impl Hash for DefWithBodyId
Source§impl Ord for DefWithBodyId
impl Ord for DefWithBodyId
Source§fn cmp(&self, other: &DefWithBodyId) -> Ordering
fn cmp(&self, other: &DefWithBodyId) -> 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 PartialEq for DefWithBodyId
impl PartialEq for DefWithBodyId
Source§impl PartialOrd for DefWithBodyId
impl PartialOrd for DefWithBodyId
Source§impl SalsaStructInDb for DefWithBodyId
impl SalsaStructInDb for DefWithBodyId
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 moreimpl StructuralPartialEq for DefWithBodyId
Auto Trait Implementations§
impl Freeze for DefWithBodyId
impl RefUnwindSafe for DefWithBodyId
impl Send for DefWithBodyId
impl Sync for DefWithBodyId
impl Unpin for DefWithBodyId
impl UnsafeUnpin for DefWithBodyId
impl UnwindSafe for DefWithBodyId
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<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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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