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
Ty(TyVariableKind)
Lifetime
Const(Ty<I>)
Trait Implementations
sourceimpl<I: Interner> CastTo<VariableKind<I>> for VariableKind<I>
impl<I: Interner> CastTo<VariableKind<I>> for VariableKind<I>
sourcefn 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
.sourceimpl<I: Clone + Interner> Clone for VariableKind<I>
impl<I: Clone + Interner> Clone for VariableKind<I>
sourcefn clone(&self) -> VariableKind<I>
fn clone(&self) -> VariableKind<I>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<I: Interner> Debug for VariableKind<I>
impl<I: Interner> Debug for VariableKind<I>
sourceimpl<I: Interner> HasInterner for VariableKind<I>
impl<I: Interner> HasInterner for VariableKind<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Hash + Interner> Hash for VariableKind<I>
impl<I: Hash + Interner> Hash for VariableKind<I>
sourceimpl<I: PartialEq + Interner> PartialEq<VariableKind<I>> for VariableKind<I>
impl<I: PartialEq + Interner> PartialEq<VariableKind<I>> for VariableKind<I>
sourcefn eq(&self, other: &VariableKind<I>) -> bool
fn eq(&self, other: &VariableKind<I>) -> bool
sourceimpl<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> StructuralEq for VariableKind<I>
impl<I: Interner> StructuralPartialEq for VariableKind<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for VariableKind<I>where
<I as Interner>::InternedType: RefUnwindSafe,
impl<I> Send for VariableKind<I>where
<I as Interner>::InternedType: Send,
impl<I> Sync for VariableKind<I>where
<I as Interner>::InternedType: Sync,
impl<I> Unpin for VariableKind<I>where
<I as Interner>::InternedType: Unpin,
impl<I> UnwindSafe for VariableKind<I>where
<I as Interner>::InternedType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for T
impl<T> Cast for T
sourcefn cast<U>(self, interner: U::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: U::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.sourceimpl<T, I> CouldMatch<T> for Twhere
T: Zip<I> + HasInterner<Interner = I> + ?Sized,
I: Interner,
impl<T, I> CouldMatch<T> for Twhere
T: Zip<I> + HasInterner<Interner = I> + ?Sized,
I: Interner,
sourcefn 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.