[−][src]Struct rusttyc::TypeCheckKey
A TypeCheckKey
references an abstract type object during the type checking procedure.
It can be created via TypeChecker::new_key
and provides functions creating TypeConstraint
s 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]
Key::Value: AbstractType,
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]
Key::Value: AbstractType,
pub fn bound_by_concrete<CT>(&self, conc: CT) -> TypeConstraint<Key> where
CT: Generalizable<Generalized = Key::Value>,
[src]
CT: Generalizable<Generalized = Key::Value>,
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]
Key::Value: AbstractType,
fn clone(&self) -> TypeCheckKey<Key>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Key: Copy + EnaKey> Copy for TypeCheckKey<Key> where
Key::Value: AbstractType,
[src]
Key::Value: AbstractType,
impl<Key: Debug + EnaKey> Debug for TypeCheckKey<Key> where
Key::Value: AbstractType,
[src]
Key::Value: AbstractType,
impl<Key: PartialEq + EnaKey> PartialEq<TypeCheckKey<Key>> for TypeCheckKey<Key> where
Key::Value: AbstractType,
[src]
Key::Value: AbstractType,
fn eq(&self, other: &TypeCheckKey<Key>) -> bool
[src]
fn ne(&self, other: &TypeCheckKey<Key>) -> bool
[src]
impl<Key: EnaKey> StructuralPartialEq for TypeCheckKey<Key> where
Key::Value: AbstractType,
[src]
Key::Value: AbstractType,
Auto Trait Implementations
impl<Key> RefUnwindSafe for TypeCheckKey<Key> where
Key: RefUnwindSafe,
Key: RefUnwindSafe,
impl<Key> Send for TypeCheckKey<Key> where
Key: Send,
Key: Send,
impl<Key> Sync for TypeCheckKey<Key> where
Key: Sync,
Key: Sync,
impl<Key> Unpin for TypeCheckKey<Key> where
Key: Unpin,
Key: Unpin,
impl<Key> UnwindSafe for TypeCheckKey<Key> where
Key: UnwindSafe,
Key: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,