Function conch_runtime::eval::eval_redirects_or_var_assignments_with_restorer [−][src]
pub fn eval_redirects_or_var_assignments_with_restorer<R, V, W, I, E: ?Sized, RR>(
restorer: RR,
vars: I,
env: &E
) -> EvalRedirectOrVarAssig<R, V, W, I::IntoIter, E, RR> where
I: IntoIterator<Item = RedirectOrVarAssig<R, V, W>>,
R: RedirectEval<E>,
V: Hash + Eq,
W: WordEval<E>,
E: FileDescEnvironment + VariableEnvironment,
E::FileHandle: From<FileDesc> + Borrow<FileDesc>,
E::VarName: Borrow<String>,
E::Var: Borrow<String>,
RR: RedirectEnvRestorer<E>,
Deprecated
: does not properly handle references to earlier assignments, use eval_redirects_or_var_assignments_with_restorers
instead
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 returned on successful evaluation. These will not be applied environment at any point as that is left up to the caller.