pub struct TyVar {
pub id: u32,
pub kind: Kind,
}Expand description
A type variable, used for polymorphic types.
Type variables can be either:
- Unification variables: Created during type inference, to be solved
- Rigid variables: Bound by forall quantifiers, cannot be unified
Fields§
§id: u32Unique identifier for this type variable.
kind: KindThe kind of this type variable.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TyVar
impl<'de> Deserialize<'de> for TyVar
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TyVar
impl StructuralPartialEq for TyVar
Auto Trait Implementations§
impl Freeze for TyVar
impl RefUnwindSafe for TyVar
impl Send for TyVar
impl Sync for TyVar
impl Unpin for TyVar
impl UnsafeUnpin for TyVar
impl UnwindSafe for TyVar
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