Module pacaptr::exec

source ·
Expand description

APIs for spawning subprocesses and handling their results.

Macros§

Structs§

  • A command to be executed, provided in command-flags-keywords form.

Enums§

  • Different ways in which a Cmd shall be dealt with.

Functions§

  • exec_tee 🔒
    Takes contents from an input stream and copy to an output stream (optional) and a Vec<u8>, then returns the Vec<u8>.
  • Returns a Result for a Cmd according to if its exit status code indicates an error.
  • Finds all lines in the given text that matches all the patterns.
  • Prints the result of grep line by line.
  • Prints the result of grep line by line, with header_lines of header prepended. If header_lines >= text.lines().count(), then text is printed without changes.
  • into_bytes 🔒
    Turns an [AsyncRead] into a [Stream].
  • Checks if an executable exists by name (consult $PATH) or by path.
  • Checks if the current user is root or admin.
  • prompt 🔒
    Gives a prompt and returns the index of the user choice.

Type Aliases§