Struct hir_def::InTypeConstId
source · pub struct InTypeConstId(/* private fields */);
Expand description
A constant in a type as a substitution for const generics (like Foo<{ 2 + 2 }>
) or as an array
length (like [u8; 2 + 2]
). These constants are body owner and are a variant of DefWithBodyId
. These
are not called AnonymousConstId
to prevent confusion with ConstBlockId
.
Implementations§
source§impl InTypeConstId
impl InTypeConstId
pub fn source(&self, db: &dyn DefDatabase) -> ConstArg
Trait Implementations§
source§impl Clone for InTypeConstId
impl Clone for InTypeConstId
source§fn clone(&self) -> InTypeConstId
fn clone(&self) -> InTypeConstId
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 InTypeConstId
impl Debug for InTypeConstId
source§impl From<InTypeConstId> for DefWithBodyId
impl From<InTypeConstId> for DefWithBodyId
source§fn from(it: InTypeConstId) -> DefWithBodyId
fn from(it: InTypeConstId) -> DefWithBodyId
Converts to this type from the input type.
source§impl From<InTypeConstId> for GeneralConstId
impl From<InTypeConstId> for GeneralConstId
source§fn from(it: InTypeConstId) -> GeneralConstId
fn from(it: InTypeConstId) -> GeneralConstId
Converts to this type from the input type.
source§impl From<InTypeConstId> for TypeOwnerId
impl From<InTypeConstId> for TypeOwnerId
source§fn from(it: InTypeConstId) -> TypeOwnerId
fn from(it: InTypeConstId) -> TypeOwnerId
Converts to this type from the input type.
source§impl Hash for InTypeConstId
impl Hash for InTypeConstId
source§impl InternKey for InTypeConstId
impl InternKey for InTypeConstId
source§fn from_intern_id(v: InternId) -> Self
fn from_intern_id(v: InternId) -> Self
Create an instance of the intern-key from a
u32
value.source§fn as_intern_id(&self) -> InternId
fn as_intern_id(&self) -> InternId
Extract the
u32
with which the intern-key was created.source§impl Lookup for InTypeConstId
impl Lookup for InTypeConstId
type Database<'db> = dyn DefDatabase + 'db
type Data = InTypeConstLoc
fn lookup(&self, db: &Self::Database<'_>) -> InTypeConstLoc
source§impl PartialEq for InTypeConstId
impl PartialEq for InTypeConstId
impl Copy for InTypeConstId
impl Eq for InTypeConstId
impl StructuralPartialEq for InTypeConstId
Auto Trait Implementations§
impl Freeze for InTypeConstId
impl RefUnwindSafe for InTypeConstId
impl Send for InTypeConstId
impl Sync for InTypeConstId
impl Unpin for InTypeConstId
impl UnwindSafe for InTypeConstId
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