Function conch_runtime::eval::eval_redirects_or_var_assignments_with_restorers [−][src]
pub fn eval_redirects_or_var_assignments_with_restorers<R, V, W, I, E: ?Sized, RR, VR>(
redirect_restorer: RR,
var_restorer: VR,
export_vars: Option<bool>,
vars: I,
env: &E
) -> EvalRedirectOrVarAssig2<R, V, W, I::IntoIter, E, RR, VR> where
I: IntoIterator<Item = RedirectOrVarAssig<R, V, W>>,
R: RedirectEval<E>,
V: Hash + Eq,
W: WordEval<E>,
E: VariableEnvironment,
E::VarName: Borrow<String>,
E::Var: Borrow<String>,
RR: RedirectEnvRestorer<E>,
VR: VarEnvRestorer2<E>,
Create a a future which will evaluate a series of redirections and variable assignments.
All redirections will be applied to the environment. On successful completion,
a RedirectEnvRestorer
will be returned which allows the caller to reverse the
changes from applying these redirections. On error, the redirections will
be automatically restored.
In addition, all evaluated variable names and values to be assigned will be
evaluated and added to the environment. If export_vars
is specified, any
variables to be inserted or updated will have their exported status set as
specified. Otherwise, variables will use their existing exported status.
On successful completion, a VarRestorer
will be returned which allows the
caller to reverse the changes from applying those assignments. On error, the
assignments will be automatically restored.