Function conch_runtime::eval::default
[−]
[src]
pub fn default<P: ?Sized, W, E: ?Sized>(
strict: bool,
param: &P,
default: Option<W>,
env: &E,
cfg: TildeExpansion
) -> EvalDefault<W::EvalResult, W::EvalFuture> where
P: ParamEval<E, EvalResult = W::EvalResult>,
W: WordEval<E>,
Constructs future representing a Default parameter substitution evaluation.
First, param will be evaluated and returned as is as long as the result is
non-empty, or if the result is defined-but-empty and strict = false.
Otherwise, default will be evaluated using cfg and that response yielded.
Note: field splitting will neither be done on the parameter, nor the default word.