Enum haybale::solver_utils::PossibleSolutions[][src]

pub enum PossibleSolutions<V: Eq + Hash> {
    Exactly(HashSet<V>),
    AtLeast(HashSet<V>),
}

Variants

Exactly(HashSet<V>)

This is exactly the set of possible solutions; there are no others. Note that an empty set here indicates there are no possible solutions.

AtLeast(HashSet<V>)

All of the solutions in this set are possible solutions, but there may be others. That is, there are at least this many solutions.

Implementations

impl<V: Eq + Hash> PossibleSolutions<V>[src]

pub fn empty() -> Self[src]

Create a new, empty, PossibleSolutions (representing no possible solution)

pub fn exactly_one(sol: V) -> Self[src]

Create a new PossibleSolutions representing exactly one possible solution

pub fn exactly_two(sol1: V, sol2: V) -> Self[src]

Create a new PossibleSolutions repesenting exactly two possible solutions

impl PossibleSolutions<BVSolution>[src]

pub fn as_u64_solutions(&self) -> Option<PossibleSolutions<u64>>[src]

Convert a PossibleSolutions over BVSolution into a PossibleSolutions over u64, by applying as_u64() to each BVSolution. If as_u64() fails for any individual solution, this returns None.

impl<V: Eq + Hash> PossibleSolutions<V>[src]

pub fn count(&self) -> SolutionCount[src]

Get a count of how many possible solutions there are.

Trait Implementations

impl<V: Clone + Eq + Hash> Clone for PossibleSolutions<V>[src]

impl<V: Debug + Eq + Hash> Debug for PossibleSolutions<V>[src]

impl<V: Eq + Hash> Eq for PossibleSolutions<V>[src]

impl<V: Eq + Hash> FromIterator<V> for PossibleSolutions<V>[src]

fn from_iter<T: IntoIterator<Item = V>>(iter: T) -> Self[src]

Create a PossibleSolutions::Exactly from the contents of an iterator

impl<V: PartialEq + Eq + Hash> PartialEq<PossibleSolutions<V>> for PossibleSolutions<V>[src]

impl<V: Eq + Hash> StructuralEq for PossibleSolutions<V>[src]

impl<V: Eq + Hash> StructuralPartialEq for PossibleSolutions<V>[src]

Auto Trait Implementations

impl<V> RefUnwindSafe for PossibleSolutions<V> where
    V: RefUnwindSafe
[src]

impl<V> Send for PossibleSolutions<V> where
    V: Send
[src]

impl<V> Sync for PossibleSolutions<V> where
    V: Sync
[src]

impl<V> Unpin for PossibleSolutions<V> where
    V: Unpin
[src]

impl<V> UnwindSafe for PossibleSolutions<V> where
    V: UnwindSafe
[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.