pub struct BufferedOutputObserver<O, E>{ /* private fields */ }Expand description
Buffered-mode RunObserver per EXEC-016.
See the module-level docs for the presentation
contract. Constructed with two sinks via Self::new; the
inner sinks can be reclaimed with Self::into_inner after
the run completes.
§Errors
Same write-failure contract as LiveOutputObserver.
Implementations§
Source§impl<O, E> BufferedOutputObserver<O, E>
impl<O, E> BufferedOutputObserver<O, E>
Sourcepub fn new(stdout: O, stderr: E) -> Self
pub fn new(stdout: O, stderr: E) -> Self
Build an observer that accumulates per-task bytes and
emits them as two contiguous blocks (stdout then
stderr) on task completion, with prefix and summary-line
rendering delegated to PlainPresenter. Equivalent to
Self::with_presenter called with Arc::new(PlainPresenter).
Sourcepub fn with_presenter(
stdout: O,
stderr: E,
presenter: Arc<dyn TaskPresenter>,
) -> Self
pub fn with_presenter( stdout: O, stderr: E, presenter: Arc<dyn TaskPresenter>, ) -> Self
Build an observer that delegates prefix and summary-line
rendering to presenter. Buffered mode ignores the prefix
(captured bytes flush verbatim), but the presenter’s
summary_* methods are still consulted on terminal
callbacks; a None return suppresses the summary line.
Sourcepub fn into_inner(self) -> (O, E)
pub fn into_inner(self) -> (O, E)
Reclaim the two sinks after the run has finished. Returns
(stdout, stderr).
Trait Implementations§
Source§impl<O, E> RunObserver for BufferedOutputObserver<O, E>
impl<O, E> RunObserver for BufferedOutputObserver<O, E>
Source§fn on_task_started(&self, task: &TaskId)
fn on_task_started(&self, task: &TaskId)
Source§fn on_stdout(&self, task: &TaskId, bytes: &[u8])
fn on_stdout(&self, task: &TaskId, bytes: &[u8])
Source§fn on_stderr(&self, task: &TaskId, bytes: &[u8])
fn on_stderr(&self, task: &TaskId, bytes: &[u8])
Self::on_stdout.Source§fn on_task_finished(&self, task: &TaskId, record: &CompletedRecord)
fn on_task_finished(&self, task: &TaskId, record: &CompletedRecord)
Self::on_task_skipped instead.Source§fn on_task_skipped(&self, task: &TaskId, record: &SkipRecord)
fn on_task_skipped(&self, task: &TaskId, record: &SkipRecord)
task
cascade-skipped per EXEC-010 / EXEC-011. Fires before
the next admission round; NEVER paired with
Self::on_task_started or Self::on_task_finished
for the same task.Source§fn on_task_cancelled(&self, task: &TaskId, record: &CancelledRecord)
fn on_task_cancelled(&self, task: &TaskId, record: &CancelledRecord)
task per EXEC-012..015. The
CancelledRecord variant distinguishes the three
shapes: an in-flight task that was signalled by the
executor; a cascade descendant of a cancelled task; or a
task drained from state.ready on cancel-fire. For an
in-flight task, Self::on_task_started has already
fired and Self::on_task_finished does NOT fire; for
the other two shapes, no other lifecycle callback fires
for the same task.