[][src]Enum canrun::state::constraints::TwoOfThree

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>),
}

Resolve two out of three Vals or return an Err(VarWatch) in a Constraint.

Variants

AB(Rc<A>, Rc<B>, Val<C>)

Returned when the first and second Vals are successfully resolved.

BC(Val<A>, Rc<B>, Rc<C>)

Returned when the second and third Vals are successfully resolved.

AC(Rc<A>, Val<B>, Rc<C>)

Returned when the first and third Vals are successfully resolved.

Implementations

impl<A: Debug, B: Debug, C: Debug> TwoOfThree<A, B, C>[src]

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>, 
[src]

Attempt to resolve a TwoOfThree enum from a State.

Auto Trait Implementations

impl<A, B, C> !RefUnwindSafe for TwoOfThree<A, B, C>

impl<A, B, C> !Send for TwoOfThree<A, B, C>

impl<A, B, C> !Sync for TwoOfThree<A, B, C>

impl<A, B, C> Unpin for TwoOfThree<A, B, C> where
    A: Unpin,
    B: Unpin,
    C: Unpin

impl<A, B, C> UnwindSafe for TwoOfThree<A, B, C> where
    A: RefUnwindSafe + UnwindSafe,
    B: RefUnwindSafe + UnwindSafe,
    C: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,