Enum chalk_ir::VariableKind
source · pub enum VariableKind<I: Interner> {
Ty(TyVariableKind),
Lifetime,
Const(Ty<I>),
}
Expand description
The “kind” of variable. Type, lifetime or constant.
Variants§
Implementations§
source§impl<I: Interner> VariableKind<I>
impl<I: Interner> VariableKind<I>
pub(crate) fn to_bound_variable( &self, interner: I, bound_var: BoundVar, ) -> GenericArg<I>
Trait Implementations§
source§impl<I: Interner> CastTo<VariableKind<I>> for VariableKind<I>
impl<I: Interner> CastTo<VariableKind<I>> for VariableKind<I>
source§fn cast_to(
self,
_interner: <VariableKind<I> as HasInterner>::Interner,
) -> VariableKind<I>
fn cast_to( self, _interner: <VariableKind<I> as HasInterner>::Interner, ) -> VariableKind<I>
Cast a value to type
T
.source§impl<I: Clone + Interner> Clone for VariableKind<I>
impl<I: Clone + Interner> Clone for VariableKind<I>
source§fn clone(&self) -> VariableKind<I>
fn clone(&self) -> VariableKind<I>
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<I: Interner> Debug for VariableKind<I>
impl<I: Interner> Debug for VariableKind<I>
source§impl<I: Interner> HasInterner for VariableKind<I>
impl<I: Interner> HasInterner for VariableKind<I>
source§impl<I: PartialEq + Interner> PartialEq for VariableKind<I>
impl<I: PartialEq + Interner> PartialEq for VariableKind<I>
source§fn eq(&self, other: &VariableKind<I>) -> bool
fn eq(&self, other: &VariableKind<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<I: Interner> Zip<I> for VariableKind<I>
impl<I: Interner> Zip<I> for VariableKind<I>
impl<I: Interner> Copy for VariableKind<I>where
I::InternedType: Copy,
impl<I: Eq + Interner> Eq for VariableKind<I>
impl<I: Interner> StructuralPartialEq for VariableKind<I>
Auto Trait Implementations§
impl<I> Freeze for VariableKind<I>
impl<I> RefUnwindSafe for VariableKind<I>
impl<I> Send for VariableKind<I>
impl<I> Sync for VariableKind<I>
impl<I> Unpin for VariableKind<I>
impl<I> UnwindSafe for VariableKind<I>
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, I> CouldMatch<T> for T
impl<T, I> CouldMatch<T> for T
source§fn could_match(
&self,
interner: I,
db: &dyn UnificationDatabase<I>,
other: &T,
) -> bool
fn could_match( &self, interner: I, db: &dyn UnificationDatabase<I>, other: &T, ) -> bool
Checks whether
self
and other
could possibly match.