pub struct Scheme {
pub vars: Vec<TyVar>,
pub constraints: Vec<Constraint>,
pub ty: Ty,
}Expand description
A polymorphic type scheme (forall-quantified type).
A scheme represents a type that may be instantiated with different
type arguments. For example, forall a. a -> a can be instantiated
as Int -> Int or Bool -> Bool.
Fields§
§vars: Vec<TyVar>The bound type variables.
constraints: Vec<Constraint>The constraints on the type variables.
ty: TyThe underlying type.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scheme
impl<'de> Deserialize<'de> for Scheme
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 Scheme
impl StructuralPartialEq for Scheme
Auto Trait Implementations§
impl Freeze for Scheme
impl RefUnwindSafe for Scheme
impl Send for Scheme
impl Sync for Scheme
impl Unpin for Scheme
impl UnsafeUnpin for Scheme
impl UnwindSafe for Scheme
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