pub trait ResumeHooks {
// Required methods
fn start_watcher(&self, session_name: &str, record: &ExecutionRecord);
fn relaunch(
&self,
backend: &str,
command: &str,
options: &IsolationOptions,
) -> IsolationResult;
fn reconcile(&self, record: &ExecutionRecord) -> ExecutionRecord;
// Provided method
fn attach_watcher(
&self,
session_name: &str,
record: &ExecutionRecord,
) -> Result<(), String> { ... }
}Expand description
Side effects a resume performs beyond running plan steps.
Injectable so tests can exercise the full resume flow without spawning a completion watcher, launching an isolation backend, or reading log files.
Required Methods§
Sourcefn start_watcher(&self, session_name: &str, record: &ExecutionRecord)
fn start_watcher(&self, session_name: &str, record: &ExecutionRecord)
Attach a fresh completion watcher to a resumed docker session.
Sourcefn relaunch(
&self,
backend: &str,
command: &str,
options: &IsolationOptions,
) -> IsolationResult
fn relaunch( &self, backend: &str, command: &str, options: &IsolationOptions, ) -> IsolationResult
Launch the command again through its isolation backend.
Sourcefn reconcile(&self, record: &ExecutionRecord) -> ExecutionRecord
fn reconcile(&self, record: &ExecutionRecord) -> ExecutionRecord
Resolve the terminal result of a session that ended unsupervised.
Provided Methods§
Sourcefn attach_watcher(
&self,
session_name: &str,
record: &ExecutionRecord,
) -> Result<(), String>
fn attach_watcher( &self, session_name: &str, record: &ExecutionRecord, ) -> Result<(), String>
Report attachment failures while keeping existing injectable hooks compatible.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".