Enum polytype::UnificationError
source · pub enum UnificationError<N: Name = &'static str> {
Occurs(Variable),
Failure(Type<N>, Type<N>),
}
Expand description
Errors during unification.
Variants§
Occurs(Variable)
Occurs
happens when occurs checks fail (i.e. a type variable is
unified recursively). The id of the bad type variable is supplied.
Failure(Type<N>, Type<N>)
Failure
happens when symbols or type variants don’t unify because of
structural differences.
Trait Implementations§
source§impl<N: Clone + Name> Clone for UnificationError<N>
impl<N: Clone + Name> Clone for UnificationError<N>
source§fn clone(&self) -> UnificationError<N>
fn clone(&self) -> UnificationError<N>
Returns a copy 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<N: Name> Display for UnificationError<N>
impl<N: Name> Display for UnificationError<N>
source§impl<N: Name + Debug> Error for UnificationError<N>
impl<N: Name + Debug> Error for UnificationError<N>
source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
source§impl<N: PartialEq + Name> PartialEq for UnificationError<N>
impl<N: PartialEq + Name> PartialEq for UnificationError<N>
source§fn eq(&self, other: &UnificationError<N>) -> bool
fn eq(&self, other: &UnificationError<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<N: Name> StructuralPartialEq for UnificationError<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for UnificationError<N>where
N: RefUnwindSafe,
impl<N> Send for UnificationError<N>where
N: Send,
impl<N> Sync for UnificationError<N>where
N: Sync,
impl<N> Unpin for UnificationError<N>where
N: Unpin,
impl<N> UnwindSafe for UnificationError<N>where
N: UnwindSafe,
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