[][src]Enum linear_solver::Inference

pub enum Inference<T> {
    OneTrue {
        from: T,
    },
    ManyTrue {
        from: Vec<T>,
    },
    Simplify {
        from: Vec<T>,
        to: T,
    },
    SimplifyOne {
        from: T,
        to: T,
    },
    SimplifyMany {
        from: Vec<T>,
        to: Vec<T>,
    },
    Propagate(T),
}

Tells the solver how to treat inference.

Variants

OneTrue

Consumes from while producing nothing.

Fields of OneTrue

from: T

Fact to remove from context.

ManyTrue

Consumes all from while producing nothing.

Fields of ManyTrue

from: Vec<T>

Facts to remove from context to be replaced by nothing.

Simplify

Consumes from and replaces it with to.

Fields of Simplify

from: Vec<T>

Facts to remove from context.

to: T

Fact to replace removed facts.

SimplifyOne

Consumes from and replaces it with to.

Fields of SimplifyOne

from: T

Fact to remove from context.

to: T

Fact to replace removed fact.

SimplifyMany

Consumes all from while producing multiple facts to.

Fields of SimplifyMany

from: Vec<T>

Facts to remove from context to be replaced by new ones.

to: Vec<T>

Multiple facts to be added to context.

Propagate(T)

Add new fact.

Methods

impl<T: Eq + Hash> Inference<T>[src]

pub fn replace_one(from: T, to: T, cache: &HashSet<T>) -> Self[src]

Replace from with to, checking the cache.

Returns OneTrue if to already exists, and SimplifyOne if to does not exist.

pub fn replace(from: Vec<T>, to: T, cache: &HashSet<T>) -> Self[src]

Replace from with to, checking the cache.

Returns ManyTrue if to already exists, and Simplify if to does not exist.

pub fn replace_many(from: Vec<T>, to: Vec<T>, cache: &HashSet<T>) -> Self[src]

Replace from with to, checking the cache.

Returns modified SimplifyMany where existing terms are removed.

Auto Trait Implementations

impl<T> Send for Inference<T> where
    T: Send

impl<T> Sync for Inference<T> where
    T: Sync

Blanket Implementations

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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