Enum ra_ap_hir::GenericDef
source · pub enum GenericDef {
Function(Function),
Adt(Adt),
Trait(Trait),
TraitAlias(TraitAlias),
TypeAlias(TypeAlias),
Impl(Impl),
Variant(Variant),
Const(Const),
}Variants§
Function(Function)
Adt(Adt)
Trait(Trait)
TraitAlias(TraitAlias)
TypeAlias(TypeAlias)
Impl(Impl)
Variant(Variant)
Const(Const)
Implementations§
source§impl GenericDef
impl GenericDef
pub fn params(self, db: &dyn HirDatabase) -> Vec<GenericParam>
pub fn lifetime_params(self, db: &dyn HirDatabase) -> Vec<LifetimeParam>
pub fn type_params(self, db: &dyn HirDatabase) -> Vec<TypeOrConstParam>
Trait Implementations§
source§impl Clone for GenericDef
impl Clone for GenericDef
source§fn clone(&self) -> GenericDef
fn clone(&self) -> GenericDef
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 GenericDef
impl Debug for GenericDef
source§impl From<Adt> for GenericDef
impl From<Adt> for GenericDef
source§fn from(it: Adt) -> GenericDef
fn from(it: Adt) -> GenericDef
Converts to this type from the input type.
source§impl From<Const> for GenericDef
impl From<Const> for GenericDef
source§fn from(it: Const) -> GenericDef
fn from(it: Const) -> GenericDef
Converts to this type from the input type.
source§impl From<Enum> for GenericDef
impl From<Enum> for GenericDef
source§fn from(it: Enum) -> GenericDef
fn from(it: Enum) -> GenericDef
Converts to this type from the input type.
source§impl From<Function> for GenericDef
impl From<Function> for GenericDef
source§fn from(it: Function) -> GenericDef
fn from(it: Function) -> GenericDef
Converts to this type from the input type.
source§impl From<GenericDef> for GenericDefId
impl From<GenericDef> for GenericDefId
source§fn from(def: GenericDef) -> Self
fn from(def: GenericDef) -> Self
Converts to this type from the input type.
source§impl From<GenericDefId> for GenericDef
impl From<GenericDefId> for GenericDef
source§fn from(def: GenericDefId) -> Self
fn from(def: GenericDefId) -> Self
Converts to this type from the input type.
source§impl From<Impl> for GenericDef
impl From<Impl> for GenericDef
source§fn from(it: Impl) -> GenericDef
fn from(it: Impl) -> GenericDef
Converts to this type from the input type.
source§impl From<Struct> for GenericDef
impl From<Struct> for GenericDef
source§fn from(it: Struct) -> GenericDef
fn from(it: Struct) -> GenericDef
Converts to this type from the input type.
source§impl From<Trait> for GenericDef
impl From<Trait> for GenericDef
source§fn from(it: Trait) -> GenericDef
fn from(it: Trait) -> GenericDef
Converts to this type from the input type.
source§impl From<TraitAlias> for GenericDef
impl From<TraitAlias> for GenericDef
source§fn from(it: TraitAlias) -> GenericDef
fn from(it: TraitAlias) -> GenericDef
Converts to this type from the input type.
source§impl From<TypeAlias> for GenericDef
impl From<TypeAlias> for GenericDef
source§fn from(it: TypeAlias) -> GenericDef
fn from(it: TypeAlias) -> GenericDef
Converts to this type from the input type.
source§impl From<Union> for GenericDef
impl From<Union> for GenericDef
source§fn from(it: Union) -> GenericDef
fn from(it: Union) -> GenericDef
Converts to this type from the input type.
source§impl From<Variant> for GenericDef
impl From<Variant> for GenericDef
source§fn from(it: Variant) -> GenericDef
fn from(it: Variant) -> GenericDef
Converts to this type from the input type.
source§impl Hash for GenericDef
impl Hash for GenericDef
source§impl PartialEq for GenericDef
impl PartialEq for GenericDef
source§fn eq(&self, other: &GenericDef) -> bool
fn eq(&self, other: &GenericDef) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for GenericDef
impl Eq for GenericDef
impl StructuralPartialEq for GenericDef
Auto Trait Implementations§
impl RefUnwindSafe for GenericDef
impl Send for GenericDef
impl Sync for GenericDef
impl Unpin for GenericDef
impl UnwindSafe for GenericDef
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
§impl<T> Cast for T
impl<T> Cast 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.