pub struct UnifierState<S, U: ?Sized> {
    pub state: S,
    pub unifier: U,
}

Fields§

§state: S§unifier: U

Trait Implementations§

source§

impl<'e, S, T> Unifier<S, T> for UnifierState<S, Unify<'e, T, T::Error>>
where T: Unifiable<S> + PartialEq + Clone + Display + 'e, T::Variable: Clone, T::Factory: Clone,

source§

fn report_error(&mut self, error: Error<T::Error, T>)

Reports an error to the unifier for cases when returning the error is not possible.
source§

fn try_match_res( &mut self, l_orig: &T, r_orig: &T ) -> Result<Option<T>, Error<T::Error, T>>

source§

fn error_type(&self) -> T

source§

fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>

Attempt to unify l and r using the strategy of Self.
source§

fn allow_returned_type_replacement(&self) -> bool

true if the returned type can be replaced by the caller

Auto Trait Implementations§

§

impl<S, U: ?Sized> RefUnwindSafe for UnifierState<S, U>

§

impl<S, U: ?Sized> Send for UnifierState<S, U>
where S: Send, U: Send,

§

impl<S, U: ?Sized> Sync for UnifierState<S, U>
where S: Sync, U: Sync,

§

impl<S, U: ?Sized> Unpin for UnifierState<S, U>
where S: Unpin, U: Unpin,

§

impl<S, U: ?Sized> UnwindSafe for UnifierState<S, U>
where S: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<Id> AsId<Id> for Id
where Id: ?Sized,

source§

fn as_id(&self) -> &Id

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Any for T
where T: Any,