Enum hir_def::GenericDefId
source · pub enum GenericDefId {
FunctionId(FunctionId),
AdtId(AdtId),
TraitId(TraitId),
TraitAliasId(TraitAliasId),
TypeAliasId(TypeAliasId),
ImplId(ImplId),
ConstId(ConstId),
}
Variants§
FunctionId(FunctionId)
AdtId(AdtId)
TraitId(TraitId)
TraitAliasId(TraitAliasId)
TypeAliasId(TypeAliasId)
ImplId(ImplId)
ConstId(ConstId)
Implementations§
source§impl GenericDefId
impl GenericDefId
pub fn file_id_and_params_of( self, db: &dyn DefDatabase, ) -> (HirFileId, Option<GenericParamList>)
pub fn assoc_trait_container(self, db: &dyn DefDatabase) -> Option<TraitId>
pub fn from_callable(db: &dyn DefDatabase, def: CallableDefId) -> GenericDefId
Trait Implementations§
source§impl Clone for GenericDefId
impl Clone for GenericDefId
source§fn clone(&self) -> GenericDefId
fn clone(&self) -> GenericDefId
Returns a copy 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 Debug for GenericDefId
impl Debug for GenericDefId
source§impl From<AdtId> for GenericDefId
impl From<AdtId> for GenericDefId
source§fn from(it: AdtId) -> GenericDefId
fn from(it: AdtId) -> GenericDefId
Converts to this type from the input type.
source§impl From<AssocItemId> for GenericDefId
impl From<AssocItemId> for GenericDefId
source§fn from(item: AssocItemId) -> Self
fn from(item: AssocItemId) -> Self
Converts to this type from the input type.
source§impl From<ConstId> for GenericDefId
impl From<ConstId> for GenericDefId
source§fn from(it: ConstId) -> GenericDefId
fn from(it: ConstId) -> GenericDefId
Converts to this type from the input type.
source§impl From<EnumId> for GenericDefId
impl From<EnumId> for GenericDefId
source§fn from(it: EnumId) -> GenericDefId
fn from(it: EnumId) -> GenericDefId
Converts to this type from the input type.
source§impl From<FunctionId> for GenericDefId
impl From<FunctionId> for GenericDefId
source§fn from(it: FunctionId) -> GenericDefId
fn from(it: FunctionId) -> GenericDefId
Converts to this type from the input type.
source§impl From<GenericDefId> for TypeOwnerId
impl From<GenericDefId> for TypeOwnerId
source§fn from(value: GenericDefId) -> Self
fn from(value: GenericDefId) -> Self
Converts to this type from the input type.
source§impl From<ImplId> for GenericDefId
impl From<ImplId> for GenericDefId
source§fn from(it: ImplId) -> GenericDefId
fn from(it: ImplId) -> GenericDefId
Converts to this type from the input type.
source§impl From<StructId> for GenericDefId
impl From<StructId> for GenericDefId
source§fn from(it: StructId) -> GenericDefId
fn from(it: StructId) -> GenericDefId
Converts to this type from the input type.
source§impl From<TraitAliasId> for GenericDefId
impl From<TraitAliasId> for GenericDefId
source§fn from(it: TraitAliasId) -> GenericDefId
fn from(it: TraitAliasId) -> GenericDefId
Converts to this type from the input type.
source§impl From<TraitId> for GenericDefId
impl From<TraitId> for GenericDefId
source§fn from(it: TraitId) -> GenericDefId
fn from(it: TraitId) -> GenericDefId
Converts to this type from the input type.
source§impl From<TypeAliasId> for GenericDefId
impl From<TypeAliasId> for GenericDefId
source§fn from(it: TypeAliasId) -> GenericDefId
fn from(it: TypeAliasId) -> GenericDefId
Converts to this type from the input type.
source§impl From<UnionId> for GenericDefId
impl From<UnionId> for GenericDefId
source§fn from(it: UnionId) -> GenericDefId
fn from(it: UnionId) -> GenericDefId
Converts to this type from the input type.
source§impl HasChildSource<Idx<LifetimeParamData>> for GenericDefId
impl HasChildSource<Idx<LifetimeParamData>> for GenericDefId
type Value = LifetimeParam
fn child_source( &self, db: &dyn DefDatabase, ) -> InFile<ArenaMap<LocalLifetimeParamId, Self::Value>>
source§impl HasChildSource<Idx<TypeOrConstParamData>> for GenericDefId
impl HasChildSource<Idx<TypeOrConstParamData>> for GenericDefId
type Value = Either<TypeOrConstParam, TraitOrAlias>
fn child_source( &self, db: &dyn DefDatabase, ) -> InFile<ArenaMap<LocalTypeOrConstParamId, Self::Value>>
source§impl HasModule for GenericDefId
impl HasModule for GenericDefId
source§fn module(&self, db: &dyn DefDatabase) -> ModuleId
fn module(&self, db: &dyn DefDatabase) -> ModuleId
Returns the enclosing module this thing is defined within.
source§fn krate(&self, db: &dyn DefDatabase) -> CrateId
fn krate(&self, db: &dyn DefDatabase) -> CrateId
Returns the crate this thing is defined within.
source§impl HasResolver for GenericDefId
impl HasResolver for GenericDefId
source§fn resolver(self, db: &dyn DefDatabase) -> Resolver
fn resolver(self, db: &dyn DefDatabase) -> Resolver
Builds a resolver for type references inside this def.
source§impl Hash for GenericDefId
impl Hash for GenericDefId
source§impl PartialEq for GenericDefId
impl PartialEq for GenericDefId
impl Copy for GenericDefId
impl Eq for GenericDefId
impl StructuralPartialEq for GenericDefId
Auto Trait Implementations§
impl Freeze for GenericDefId
impl RefUnwindSafe for GenericDefId
impl Send for GenericDefId
impl Sync for GenericDefId
impl Unpin for GenericDefId
impl UnwindSafe for GenericDefId
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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<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