pub fn given<T, A, F>(&mut self, item: A, closure: F) -> InferenceResult
    where
        T: Factoid + Output + 'static,
        A: IntoExp<T>,
        F: Fn(&mut Solver<'rules>, T::Concrete) -> InferenceResult + 'rules,
    {
        let rule = GivenRule::new(item.bex(), closure);
        self.rules.push(Box::new(rule));
        Ok(())
    }
/// Adds rules to the solver once the value of an expression is known.
///
/// For instance, one could write:
/// ```text
/// solver.given(input.rank, |solver, ir|
///     (0..ir).map(|i| solver.equals(input.shape[ir], 0))
/// );
/// ```
Adds rules to the solver once the value of an expression is known.
Adds rules to the solver once the value of an expression is known .
pub fn given<T, A, F>(&mut self, item: A, closure: F) -> InferenceResult
    where
        T: Factoid + Output + 'static,
        A: IntoExp<T>,
        F: Fn(&mut Solver<'rules>, T::Concrete) -> InferenceResult + 'rules,
    {
        let rule = GivenRule::new(item.bex(), closure);
        self.rules.push(Box::new(rule));
        Ok(())
    }
pub fn given < T , A , F > ( & mut self , item : A , closure : F ) -> InferenceResult where T : Factoid + Output + ' static , A : IntoExp < T > , F : Fn ( & mut Solver < ' rules > , T :: Concrete ) -> InferenceResult + ' rules , { let rule = GivenRule :: new ( item . bex ( ) , closure ) ; self . rules . push ( Box :: new ( rule ) ) ; Ok ( ( ) ) }
Adds rules to the solver once the value of an expression is known.
Adds rules to the solver once the value of an expression is known .
&mut self
item
A
closure
F
&mut self
item
A
closure
F