[][src]Struct rusttyc::TypeCheckKey

pub struct TypeCheckKey<Key: EnaKey>(_)
where
    Key::Value: AbstractType
;

A TypeCheckKey references an abstract type object during the type checking procedure. It can be created via TypeChecker::new_key and provides functions creating TypeConstraints that impose rules on type variables, e.g. by constraining single types are relating others.

Methods

impl<Key: UnifyKey> TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

pub fn more_concrete_than(self, other: Self) -> TypeConstraint<Key>[src]

States that the left operand needs to be at least as concrete as the right one. Imposing these constraints lets the abstract type of self become the meet of the current abstract type of self and other.

pub fn is_the_meet_of(self, args: &[Self]) -> TypeConstraint<Key>[src]

States that target needs to be more concrete than all args combined. Imposing this constraint computes the meet of all args and enforces that self is more concrete than the result.

pub fn bound_by_abstract(self, other: Key::Value) -> TypeConstraint<Key>[src]

Bounds self by other where other is an abstract type.

impl<Key: UnifyKey> TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

pub fn bound_by_concrete<CT>(&self, conc: CT) -> TypeConstraint<Key> where
    CT: Generalizable<Generalized = Key::Value>, 
[src]

Bounds self by the generalization of the concrete type conc.

Trait Implementations

impl<Key: Clone + EnaKey> Clone for TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

impl<Key: Copy + EnaKey> Copy for TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

impl<Key: Debug + EnaKey> Debug for TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

impl<Key: PartialEq + EnaKey> PartialEq<TypeCheckKey<Key>> for TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

impl<Key: EnaKey> StructuralPartialEq for TypeCheckKey<Key> where
    Key::Value: AbstractType
[src]

Auto Trait Implementations

impl<Key> RefUnwindSafe for TypeCheckKey<Key> where
    Key: RefUnwindSafe

impl<Key> Send for TypeCheckKey<Key> where
    Key: Send

impl<Key> Sync for TypeCheckKey<Key> where
    Key: Sync

impl<Key> Unpin for TypeCheckKey<Key> where
    Key: Unpin

impl<Key> UnwindSafe for TypeCheckKey<Key> where
    Key: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.