pub enum GeneralConstId<'db> {
ConstId(ConstId),
StaticId(StaticId),
AnonConstId(AnonConstId<'db>),
}Expand description
A constant, which might appears as a const item, an anonymous const block in expressions or patterns, or as a constant in types with const generics.
Variants§
Implementations§
Source§impl<'db> GeneralConstId<'db>
impl<'db> GeneralConstId<'db>
pub fn generic_def( self, db: &'db (dyn HirDatabase + 'static), ) -> Option<GenericDefId>
pub fn name(self, db: &'db (dyn SourceDatabase + 'static)) -> String
Trait Implementations§
Source§impl<'db> Clone for GeneralConstId<'db>
impl<'db> Clone for GeneralConstId<'db>
Source§fn clone(&self) -> GeneralConstId<'db>
fn clone(&self) -> GeneralConstId<'db>
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<'db> Copy for GeneralConstId<'db>
Source§impl<'db> Debug for GeneralConstId<'db>
impl<'db> Debug for GeneralConstId<'db>
impl<'db> Eq for GeneralConstId<'db>
Source§impl<'db> From<AnonConstId<'db>> for GeneralConstId<'db>
impl<'db> From<AnonConstId<'db>> for GeneralConstId<'db>
Source§fn from(it: AnonConstId<'db>) -> GeneralConstId<'db>
fn from(it: AnonConstId<'db>) -> GeneralConstId<'db>
Converts to this type from the input type.
Source§impl<'db> From<ConstId> for GeneralConstId<'db>
impl<'db> From<ConstId> for GeneralConstId<'db>
Source§fn from(it: ConstId) -> GeneralConstId<'db>
fn from(it: ConstId) -> GeneralConstId<'db>
Converts to this type from the input type.
Source§impl<'db> From<GeneralConstId<'db>> for SolverDefId<'db>
impl<'db> From<GeneralConstId<'db>> for SolverDefId<'db>
Source§fn from(value: GeneralConstId<'db>) -> SolverDefId<'db>
fn from(value: GeneralConstId<'db>) -> SolverDefId<'db>
Converts to this type from the input type.
Source§impl<'db> From<GeneralConstId<'db>> for GeneralConstIdWrapper<'db>
impl<'db> From<GeneralConstId<'db>> for GeneralConstIdWrapper<'db>
Source§fn from(value: GeneralConstId<'db>) -> GeneralConstIdWrapper<'db>
fn from(value: GeneralConstId<'db>) -> GeneralConstIdWrapper<'db>
Converts to this type from the input type.
Source§impl<'db> From<GeneralConstIdWrapper<'db>> for GeneralConstId<'db>
impl<'db> From<GeneralConstIdWrapper<'db>> for GeneralConstId<'db>
Source§fn from(value: GeneralConstIdWrapper<'db>) -> GeneralConstId<'db>
fn from(value: GeneralConstIdWrapper<'db>) -> GeneralConstId<'db>
Converts to this type from the input type.
Source§impl<'db> From<StaticId> for GeneralConstId<'db>
impl<'db> From<StaticId> for GeneralConstId<'db>
Source§fn from(it: StaticId) -> GeneralConstId<'db>
fn from(it: StaticId) -> GeneralConstId<'db>
Converts to this type from the input type.
Source§impl<'db> Hash for GeneralConstId<'db>
impl<'db> Hash for GeneralConstId<'db>
Source§impl<'db> PartialEq for GeneralConstId<'db>
impl<'db> PartialEq for GeneralConstId<'db>
impl<'db> StructuralPartialEq for GeneralConstId<'db>
Auto Trait Implementations§
impl<'db> Freeze for GeneralConstId<'db>
impl<'db> RefUnwindSafe for GeneralConstId<'db>
impl<'db> Send for GeneralConstId<'db>
impl<'db> Sync for GeneralConstId<'db>
impl<'db> Unpin for GeneralConstId<'db>
impl<'db> UnsafeUnpin for GeneralConstId<'db>
impl<'db> UnwindSafe for GeneralConstId<'db>
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<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> 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
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<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