pub struct Capture { /* private fields */ }Expand description
Framed stdout/stderr chunks, optionally stored on disk without buffering the task’s log, and shown as the task’s display asks.
Implementations§
Source§impl Capture
impl Capture
Sourcepub fn new(file: Option<File>, display: Display) -> Self
pub fn new(file: Option<File>, display: Display) -> Self
Streams output through its display, optionally recording cache frames on disk. A headed display announces the task here, as it starts.
Sourcepub fn retain_log(self) -> Self
pub fn retain_log(self) -> Self
Retains a bounded execution log alongside any result-cache capture.
Sourcepub fn take_log(&self) -> Option<RecordedLog>
pub fn take_log(&self) -> Option<RecordedLog>
Takes the retained log after the command’s output readers have finished.
Sourcepub fn ready_when(self, patterns: &[String], ready: Arc<AtomicBool>) -> Self
pub fn ready_when(self, patterns: &[String], ready: Arc<AtomicBool>) -> Self
Sets ready once every one of patterns has appeared in the output.
Sourcepub fn log_matches(self, patterns: &[String], verdict: Arc<Verdict>) -> Self
pub fn log_matches(self, patterns: &[String], verdict: Arc<Verdict>) -> Self
Decides verdict once every one of patterns has appeared in the
output, control sequences left out.
Sourcepub fn unready(&self) -> Vec<String>
pub fn unready(&self) -> Vec<String>
The readyWhen text that has not appeared, if any was asked for.
Sourcepub fn note(&self, text: &str) -> Result<()>
pub fn note(&self, text: &str) -> Result<()>
Adds a line of qk’s own to the task’s error output. It is no output of the task’s, so readiness checks never see it: a note quoting the text one waits for must not make the task ready.