[][src]Struct lark_unify::UnificationTable

pub struct UnificationTable<Interners, Cause> { /* fields omitted */ }

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]

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]

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]

Creates a new inferable thing.

pub fn drain_events(
    &mut self
) -> impl Iterator<Item = InferVar> + '_
[src]

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]

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_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

impl<Interners, Cause> Sync for UnificationTable<Interners, Cause> where
    Cause: Sync,
    Interners: Sync

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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.

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

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