Protocol for extracting execution results from various result types.
This protocol provides a unified interface for both:
- CommandResult structs (which still have output for external commands)
- AST nodes with embedded execution results (output goes to sinks)
Note: stdout/stderr/all_output functions return results from the collector for Script types, and empty strings for AST nodes since output goes to sinks.
Summary
Functions
Get all output as a string
Get exit code
Get stderr output as a string
Get stdout output as a string
Check if execution was successful (exit code 0)
Types
@type t() :: term()
All the types that implement this protocol.
Functions
Get all output as a string
@spec exit_code(t()) :: non_neg_integer() | nil
Get exit code
Get stderr output as a string
Get stdout output as a string
Check if execution was successful (exit code 0)