pub struct ExecutionResult {
pub snapshot: Arc<LazyGuardedTempDir>,
pub final_cwd: GuardedPath,
pub bindings: BTreeMap<String, Value>,
}Expand description
Output of a script execution (issue #131).
The snapshot directory is created lazily: ExecutionResult::snapshot
stays unmaterialized when the script never touches snapshot-rooted state
(e.g. WORKSPACE LOCAL-only or empty scripts), in which case
ExecutionResult::has_snapshot is false and final_cwd points under
the workspace root.
Fields§
§snapshot: Arc<LazyGuardedTempDir>Shared ownership of the snapshot backing dir. The physical directory lives exactly as long as the last surviving clone (normally this struct, since execution-internal clones are dropped before return).
final_cwd: GuardedPathActual final cwd: inside the snapshot when materialized, otherwise under the workspace/local root.
bindings: BTreeMap<String, Value>Top-level script variable bindings captured at completion, keyed by
variable name. Empty when the script is empty. Populated exclusively
by execute_with_result; --shell runs never produce one.
Implementations§
Source§impl ExecutionResult
impl ExecutionResult
Sourcepub fn has_snapshot(&self) -> bool
pub fn has_snapshot(&self) -> bool
Whether the run materialized the snapshot tempdir.
Sourcepub fn snapshot_path(&self) -> Option<&GuardedPath>
pub fn snapshot_path(&self) -> Option<&GuardedPath>
Borrow the snapshot root iff materialized.