Enum hir::GenericDef
source · pub enum GenericDef {
Function(Function),
Adt(Adt),
Trait(Trait),
TraitAlias(TraitAlias),
TypeAlias(TypeAlias),
Impl(Impl),
Const(Const),
}
Variants§
Function(Function)
Adt(Adt)
Trait(Trait)
TraitAlias(TraitAlias)
TypeAlias(TypeAlias)
Impl(Impl)
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§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 Hash for GenericDef
impl Hash for GenericDef
source§impl PartialEq for GenericDef
impl PartialEq for GenericDef
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
§impl<T> Cast for T
impl<T> Cast for T
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