Enum canrun::state::constraints::TwoOfThree [−][src]
pub enum TwoOfThree<A: Debug, B: Debug, C: Debug> { AB(Rc<A>, Rc<B>, Val<C>), BC(Val<A>, Rc<B>, Rc<C>), AC(Rc<A>, Val<B>, Rc<C>), }
Expand description
Resolve two out of three Val
s or return an Err(VarWatch)
in a Constraint
.
Variants
Returned when the first and second Val
s are successfully resolved.
Returned when the second and third Val
s are successfully resolved.
Returned when the first and third Val
s are successfully resolved.
Implementations
pub fn resolve<'a, D>(
a: &Val<A>,
b: &Val<B>,
c: &Val<C>,
state: &State<'a, D>
) -> Result<TwoOfThree<A, B, C>, VarWatch> where
D: DomainType<'a, A> + DomainType<'a, B> + DomainType<'a, C>,
pub fn resolve<'a, D>(
a: &Val<A>,
b: &Val<B>,
c: &Val<C>,
state: &State<'a, D>
) -> Result<TwoOfThree<A, B, C>, VarWatch> where
D: DomainType<'a, A> + DomainType<'a, B> + DomainType<'a, C>,
Attempt to resolve a TwoOfThree
enum from a State
.