pub enum SortVarVal {
Unsolved(SortCstr),
Solved(Sort),
}Expand description
Unification value for sort variables used during sort checking.
Variants§
Unsolved(SortCstr)
The variable is not yet solved but the solution must satisfy some constraint.
Solved(Sort)
The variable has been solved to a sort.
Implementations§
Source§impl SortVarVal
impl SortVarVal
pub fn solved_or(&self, sort: &Sort) -> Sort
pub fn map_solved(&self, f: impl FnOnce(&Sort) -> Sort) -> SortVarVal
Trait Implementations§
Source§impl Clone for SortVarVal
impl Clone for SortVarVal
Source§fn clone(&self) -> SortVarVal
fn clone(&self) -> SortVarVal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SortVarVal
impl Debug for SortVarVal
Source§impl Default for SortVarVal
impl Default for SortVarVal
Source§impl PartialEq for SortVarVal
impl PartialEq for SortVarVal
Source§impl UnifyValue for SortVarVal
impl UnifyValue for SortVarVal
Source§type Error = ()
type Error = ()
Defines the type to return when merging of two values fails.
If merging is infallible, use the special struct
NoError
found in this crate, which unlocks various more convenient
methods on the unification table.Source§fn unify_values(value1: &Self, value2: &Self) -> Result<Self, Self::Error>
fn unify_values(value1: &Self, value2: &Self) -> Result<Self, Self::Error>
Given two values, produce a new value that combines them.
If that is not possible, produce an error.
impl Eq for SortVarVal
impl StructuralPartialEq for SortVarVal
Auto Trait Implementations§
impl Freeze for SortVarVal
impl RefUnwindSafe for SortVarVal
impl Send for SortVarVal
impl Sync for SortVarVal
impl Unpin for SortVarVal
impl UnwindSafe for SortVarVal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more