[−][src]Struct lark_unify::UnificationTable
Methods
impl<Interners, Cause> UnificationTable<Interners, Cause>
[src]
pub fn new(interners: Interners) -> Self
[src]
pub fn shallow_resolve_data<K>(
&mut self,
value: K
) -> Result<K::KnownData, InferVar> where
K: Inferable<Interners>,
[src]
&mut self,
value: K
) -> Result<K::KnownData, InferVar> where
K: Inferable<Interners>,
value
to a known-value, if possible. Else, it must be an inference variable,
so return that InferVar
.
pub fn is_known(
&mut self,
index: impl Inferable<Interners>
) -> bool
[src]
&mut self,
index: impl Inferable<Interners>
) -> bool
True if index
has been assigned to a value, false otherwise.
pub fn var_is_known(&mut self, var: InferVar) -> bool
[src]
True if var
has been assigned to a value, false otherwise.
pub fn new_inferable<K>(&mut self) -> K where
K: Inferable<Interners>,
[src]
K: Inferable<Interners>,
Creates a new inferable thing.
pub fn drain_events(
&mut self
) -> impl Iterator<Item = InferVar> + '_
[src]
&mut self
) -> impl Iterator<Item = InferVar> + '_
Read out all the variables that may have been unified
since the last invocation to drain_events
.
pub fn unify<K>(
&mut self,
cause: Cause,
key1: K,
key2: K
) -> Result<(), (K::KnownData, K::KnownData)> where
K: Inferable<Interners>,
[src]
&mut self,
cause: Cause,
key1: K,
key2: K
) -> Result<(), (K::KnownData, K::KnownData)> where
K: Inferable<Interners>,
Tries to unify key1
and key2
-- if one or both is an unbound inference variable,
we will record the connection between them. But if they both represent known values,
then we will return the two known values so you can recursively unify those.
Trait Implementations
impl<Interners: Clone, Cause: Clone> Clone for UnificationTable<Interners, Cause>
[src]
fn clone(&self) -> UnificationTable<Interners, Cause>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<Interners, Cause> Send for UnificationTable<Interners, Cause> where
Cause: Send,
Interners: Send,
Cause: Send,
Interners: Send,
impl<Interners, Cause> Sync for UnificationTable<Interners, Cause> where
Cause: Sync,
Interners: Sync,
Cause: Sync,
Interners: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,