[][src]Struct libslide::partial_evaluator::variable_expand::LazyVariableExpander

struct LazyVariableExpander<'a> {
    expr: RcExpr,
    expand_defs: HashMap<InternedStr, &'a RcExpr>,
}

Lazily expands variables in an expression.

A LazyVariableExpander expands each variable exactly once, when finish is called, and does not expand variables within an expanded variable definition.

For example, "a + b".expand("a = b + 1").expand("b = c") would expand to "b + 1 + c". Compare this to an EagerVariableExpander.

Furthermore, the variable definition used by a LazyVariableExpander is the last one given via expand.

For example, "a + a".expand("a = 1").expand("a = 10") would expand to "10 + 10".

Fields

expr: RcExprexpand_defs: HashMap<InternedStr, &'a RcExpr>

Trait Implementations

impl<'a> ExpressionTransformer<'a> for LazyVariableExpander<'a>[src]

impl<'a> VariableExpander<'a> for LazyVariableExpander<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for LazyVariableExpander<'a>

impl<'a> Send for LazyVariableExpander<'a>

impl<'a> Sync for LazyVariableExpander<'a>

impl<'a> Unpin for LazyVariableExpander<'a>

impl<'a> UnwindSafe for LazyVariableExpander<'a>

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, 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.