Expand description
APIs for spawning subprocesses and handling their results.
Macrosยง
- docs_
errors_ ๐exec - docs_
errors_ ๐grep
Structsยง
- Cmd
- A command to be executed, provided in
command-flags-keywords
form.
Enumsยง
Functionsยง
- exec_
tee ๐ - Takes contents from an input stream and copy to an output stream (optional)
and a
Vec<u8>
, then returns theVec<u8>
. - exit_
result ๐ - Returns a
Result
for aCmd
according to if its exit status code indicates an error. - grep
- Finds all lines in the given
text
that matches all thepatterns
. - grep_
print - Prints the result of
grep
line by line. - grep_
print_ with_ header - Prints the result of
grep
line by line, withheader_lines
of header prepended. Ifheader_lines >= text.lines().count()
, thentext
is printed without changes. - into_
bytes ๐ - Turns an [
AsyncRead
] into a [Stream
]. - is_exe
- Checks if an executable exists by name (consult
$PATH
) or by path. - is_root
- Checks if the current user is root or admin.
- prompt ๐
- Gives a prompt and returns the index of the user choice.
Type Aliasesยง
- Output
- The type for captured
stdout
, and if set toMode::CheckAll
, mixed with capturedstderr
. - Status
Code - The status code type returned by a
Cmd
,