Module conch_runtime::eval [] [src]

A module for evaluating arbitrary shell components such as words, parameter subsitutions, redirections, and others.

Modules

ast_impl

This module defines various WordEval implementations on AST types defined by the conch-parser crate.

Structs

Alternative

A future representing a Alternative parameter substitution evaluation.

Assign

A future representing a Assign parameter substitution evaluation.

Assignment

A future representing a word evaluation without doing field and pathname expansions.

Concat

A future adapter which concatenates multiple words together.

DoubleQuoted

A future representing the evaluation of a double quoted list of words.

Error

A future representing a Error parameter substitution evaluation.

EvalDefault

A future representing a Default parameter substitution evaluation.

EvalRedirectOrCmdWord

A future which will evaluate a series of redirections and shell words.

EvalRedirectOrVarAssig [
Deprecated
]

A future which will evaluate a series of redirections and variable assignments.

EvalRedirectOrVarAssig2

A future which will evaluate a series of redirections and variable assignments.

Pattern

A future representing a word evaluation as a pattern.

Redirect

A future representing the evaluation of a redirect.

RemoveLargestPrefix

A future representing a RemoveLargestPrefix parameter substitution evaluation.

RemoveLargestSuffix

A future representing a RemoveLargestSuffix parameter substitution evaluation.

RemoveSmallestPrefix

A future representing a RemoveSmallestPrefix parameter substitution evaluation.

RemoveSmallestSuffix

A future representing a RemoveSmallestSuffix parameter substitution evaluation.

Split

A future representing a word evaluation and conditionally splitting it afterwards.

WordEvalConfig

A config object for customizing WordEval evaluations.

Enums

EvalRedirectOrCmdWordError

An error which may arise when evaluating a redirect or a shell word.

EvalRedirectOrVarAssigError

An error which may arise when evaluating a redirect or a variable assignment.

Fields

Represents the types of fields that may result from evaluating a word. It is important to maintain such distinctions because evaluating parameters such as $@ and $* have different behaviors in different contexts.

RedirectAction

Indicates what changes should be made to the environment as a result of a successful Redirect evaluation.

RedirectOrCmdWord

Represents a redirect or a command word.

RedirectOrVarAssig

Represents a redirect or a defined environment variable at the start of a command.

TildeExpansion

An enum representing how tildes (~) are expanded.

Traits

ArithEval

A trait for evaluating arithmetic expansions.

ParamEval

A trait for evaluating parameters.

RedirectEval

A trait for evaluating file descriptor redirections.

WordEval

A trait for evaluating shell words with various rules for expansion.

Functions

alternative

Constructs future representing a Alternative parameter substitution evaluation.

assign

Constructs future representing a Assign parameter substitution evaluation.

concat

Creates a future adapter which concatenates multiple words together.

default

Constructs future representing a Default parameter substitution evaluation.

double_quoted

Evaluates a list of words as if they were double quoted.

error

Constructs future representing a Error parameter substitution evaluation.

eval_redirects_or_cmd_words

Create a future which will evaluate a series of redirections and shell words.

eval_redirects_or_cmd_words_with_restorer

Create a future which will evaluate a series of redirections and shell words, and supply a RedirectEnvRestorer to use.

eval_redirects_or_var_assignments [
Deprecated
]

Create a a future which will evaluate a series of redirections and variable assignments.

eval_redirects_or_var_assignments_with_restorer [
Deprecated
]

Create a a future which will evaluate a series of redirections and variable assignments.

eval_redirects_or_var_assignments_with_restorers

Create a a future which will evaluate a series of redirections and variable assignments.

len

Evaluates a parameter and returns the length of the result.

redirect_append

Evaluate a redirect which will open a file in append mode.

redirect_clobber

Evaluate a redirect which will open a file for writing, regardless if the noclobber option is set.

redirect_dup_read

Evaluate a redirect which will either duplicate a readable file descriptor as specified by src_fd into dst_fd, or close dst_fd if src_fd evaluates to -.

redirect_dup_write

Evaluate a redirect which will either duplicate a writeable file descriptor as specified by src_fd into dst_fd, or close dst_fd if src_fd evaluates to -.

redirect_heredoc

Evaluate a redirect which write the body of a here-document into fd.

redirect_read

Evaluate a redirect which will open a file for reading.

redirect_readwrite

Evaluate a redirect which will open a file for reading and writing.

redirect_write

Evaluate a redirect which will open a file for writing, failing if the noclobber option is set.

remove_largest_prefix

Constructs future representing a RemoveLargestPrefix parameter substitution evaluation.

remove_largest_suffix

Constructs future representing a RemoveLargestSuffix parameter substitution evaluation.

remove_smallest_prefix

Constructs future representing a RemoveSmallestPrefix parameter substitution evaluation.

remove_smallest_suffix

Constructs future representing a RemoveSmallestSuffix parameter substitution evaluation.

split

Creates a future adapter that will conditionally split the resulting fields of the inner future.