[−][src]Struct libslide::partial_evaluator::variable_expand::LazyVariableExpander
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: RcExpr
expand_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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,