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.
Auto Trait Implementations§
impl Forget for ExecutionResult
impl Freeze for ExecutionResultwhere
*const ArcInner<LazyGuardedTempDir> is !null: Freeze,
PhantomData<ArcInner<LazyGuardedTempDir>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for ExecutionResult
impl RefUnwindSafe for ExecutionResultwhere
Atomic<usize>: RefUnwindSafe,
OnceLock<GuardedTempDir>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
impl Send for ExecutionResult
impl Sync for ExecutionResult
impl Unpin for ExecutionResult
impl UnsafeUnpin for ExecutionResultwhere
*const ArcInner<LazyGuardedTempDir> is !null: UnsafeUnpin,
PhantomData<ArcInner<LazyGuardedTempDir>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for ExecutionResultwhere
Arc<LazyGuardedTempDir>: UnwindSafe,
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.