shell_candy/task/
output.rs

1use std::process::ExitStatus;
2
3/// ShellTaskOutput is returned by `ShellTask::run` and contains information about the task on completion.
4#[derive(Debug)]
5pub enum ShellTaskOutput<T> {
6    /// This variant is returned when the specified log handler returns early or runs into an unrecoverable error.
7    EarlyReturn {
8        /// The lines printed to `stdout` by the task up until the point of early return.
9        stdout_lines: Vec<String>,
10
11        /// The lines printed to `stderr` by the task up until the point of early return.
12        stderr_lines: Vec<String>,
13
14        /// The early return value.
15        return_value: T,
16    },
17
18    /// This variant is returned when the specified log handler did not return early.
19    CompleteOutput {
20        /// The exit status of the task.
21        status: ExitStatus,
22
23        /// The lines printed to `stdout` by the task.
24        stdout_lines: Vec<String>,
25
26        /// The lines printed to `stderr` by the task.
27        stderr_lines: Vec<String>,
28    },
29}