[−][src]Trait lark_unify::Inferable
Each "inferable" value represents something which can be inferred.
For example, the crate::ty::Perm
and crate::ty::Base
types implement
inferable.
Each inferable value either corresponds to "known data" or else to an
inference variable (this variable may itself be unified etc). The Inferable
trait lets us check whether this value represents an inference variable
or not (via as_infer_var
) and also to extract the known data (via assert_known
).
Associated Types
Loading content...Required methods
fn as_infer_var(self, interners: &Interners) -> Option<InferVar>
Check if this is an inference variable and return the inference index if so.
fn from_infer_var(var: InferVar, interners: &Interners) -> Self
Create an inferable representing the inference variable var
.
fn assert_known(self, interners: &Interners) -> Self::KnownData
Asserts that this is not an inference variable and returns the "known data" that it represents.