SmolBox.Result (SmolBox v0.1.0)

Copy Markdown View Source

Observed command output and exit status. A nonzero exit is still an observed result.

Buffered execution uses :bytes; SSE output uses :lossy_utf8 because SmolVM 1.14.1 does not preserve arbitrary bytes on that route. This result does not assert application success, artifact collection, or machine cleanup.

Summary

Functions

Decode byte-exact buffered output; lossy fallback is deliberately unsupported.

Types

t()

@type t() :: %SmolBox.Result{
  encoding: :bytes | :lossy_utf8,
  exit_code: integer(),
  stderr: binary(),
  stdout: binary(),
  truncated: boolean()
}

Functions

from_wire(body, max_output_bytes)

@spec from_wire(term(), pos_integer()) :: {:ok, t()} | {:error, SmolBox.Error.t()}

Decode byte-exact buffered output; lossy fallback is deliberately unsupported.