[][src]Enum rusttyc::TypeConstraint

#[must_use = "the creation of a `TypeConstraint` has no effect, it should be passed to a `TypeChecker`"]
pub enum TypeConstraint<Key: UnifyKey> where
    Key::Value: AbstractType
{ MoreConcreteThanAll { target: TypeCheckKey<Key>, args: Vec<TypeCheckKey<Key>>, }, MoreConcreteThanType { target: TypeCheckKey<Key>, args: Vec<Key::Value>, }, }

Represents a constraint on one or several abstract types referred to by TypeCheckKeys. Rather than creating these constraints directly, TypeCheckKey provides several convenient functions for this purpose.

Variants

MoreConcreteThanAll

Represents the restriction that target is more concrete than the meet of all abstract types belonging to the keys in args.

Fields of MoreConcreteThanAll

target: TypeCheckKey<Key>args: Vec<TypeCheckKey<Key>>
MoreConcreteThanType

Represents the restriction that target is more concrete than the meet of all abstract types in args.

Fields of MoreConcreteThanType

target: TypeCheckKey<Key>args: Vec<Key::Value>

Auto Trait Implementations

impl<Key> RefUnwindSafe for TypeConstraint<Key> where
    Key: RefUnwindSafe,
    <Key as UnifyKey>::Value: RefUnwindSafe

impl<Key> Send for TypeConstraint<Key> where
    Key: Send,
    <Key as UnifyKey>::Value: Send

impl<Key> Sync for TypeConstraint<Key> where
    Key: Sync,
    <Key as UnifyKey>::Value: Sync

impl<Key> Unpin for TypeConstraint<Key> where
    Key: Unpin,
    <Key as UnifyKey>::Value: Unpin

impl<Key> UnwindSafe for TypeConstraint<Key> where
    Key: UnwindSafe,
    <Key as UnifyKey>::Value: 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, 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.