Skip to documentation
SLOP

tiny.sandbox.Result

Reference tiny.sandbox Result

Defined in result.

Holds the resources and captured outputs of an execution, owning the standard output and standard error buffers, the recorded change set, the configuration Audit, and the layer directory.

API (9)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callsresultResult
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/sandbox/src/result.zig:16

zig
/// Holds the resources and captured outputs of an execution, owning the/// standard output and standard error buffers, the recorded change set, the/// configuration `Audit`, and the layer directory.////// Calling `deinit` frees the stream buffers and change set memory, then/// deletes the temporary layer directory. Callers that want to keep files/// generated in the layer must read or copy them out before calling `deinit`.pub const Result = struct {    allocator: Allocator,    layer: layer_data.Layer,    status: command.Status,    stdout: []u8,    stderr: []u8,    changes: change.Set,    audit: audit_data.Audit,    pub fn deinit(self: *Result) void {        self.changes.deinit();        self.allocator.free(self.stdout);        self.allocator.free(self.stderr);        self.layer.deinit();        self.* = undefined;    }    /// Reads an output file through the layer directory handle into a buffer    /// allocated with `allocator`, transferring ownership of the slice to the    /// caller, who must free it using the supplied allocator. Relative path    /// resolution starts at the root of the layer directory but performs no    /// path-containment checks, allowing lookups that navigate outside the    /// layer. The `limit` argument sets the maximum number of bytes to read.    pub fn readFileAlloc(self: *const Result, allocator: Allocator, path: []const u8, limit: usize) ![]u8 {        return try self.layer.readFileAlloc(allocator, path, limit);    }};

Source: lib/sandbox/src/root.zig:61

zig
pub const Result = result.Result;
Called byCallsNo direct callersChangeSetdeinitResultdeinit
Static calls · unresolved targets: 1 · external targets: 1.

Also reachable as

run.Result.

Audit

Definitions3
Public names9
Members7
Version26.7.0
Revisiondaab053ee433