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_or_const_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 Freeze for GenericDef
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
source§impl<T> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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