pub struct OutputWriter<W: Write> { /* private fields */ }Expand description
Sink that streams each committed run to runs.csv and series.csv, and counts the rows by status.
A run’s series is written and flushed before its row in runs.csv, so every run in runs.csv has its whole
series written.
Implementations§
Source§impl<W: Write> OutputWriter<W>
impl<W: Write> OutputWriter<W>
Sourcepub fn new(
plan: Arc<Plan>,
runs: RunsWriter<W>,
series: SeriesWriter<W>,
) -> Self
pub fn new( plan: Arc<Plan>, runs: RunsWriter<W>, series: SeriesWriter<W>, ) -> Self
Returns a writer for the runs of plan over writers whose headers are written.
Sourcepub fn write_run(&mut self, outcome: &RunOutcome) -> Result<()>
pub fn write_run(&mut self, outcome: &RunOutcome) -> Result<()>
Sourcepub fn write_config_run(
&mut self,
outcome: &RunOutcome,
config: &Config,
) -> Result<()>
pub fn write_config_run( &mut self, outcome: &RunOutcome, config: &Config, ) -> Result<()>
Writes the series of outcome, a run of config, then its row, and flushes after each write.
A search writes its runs this way. Its configs are in no plan.
§Errors
Returns the error of a write or a flush.
Sourcepub fn counts(&self) -> ResultCounts
pub fn counts(&self) -> ResultCounts
Counts of the rows written so far.
Trait Implementations§
Source§impl<W: Write> RunSink for OutputWriter<W>
impl<W: Write> RunSink for OutputWriter<W>
Source§fn commit(&mut self, outcome: RunOutcome) -> Result<()>
fn commit(&mut self, outcome: RunOutcome) -> Result<()>
Receives a finished run. Runs arrive on the calling thread in request order. Read more
Source§fn finished(&mut self, _outcome: &RunOutcome)
fn finished(&mut self, _outcome: &RunOutcome)
Sees a run as it finishes, before
Self::commit receives it. Runs arrive on the calling thread in the order
they finish.Auto Trait Implementations§
impl<W> Freeze for OutputWriter<W>
impl<W> RefUnwindSafe for OutputWriter<W>
impl<W> Send for OutputWriter<W>
impl<W> Sync for OutputWriter<W>
impl<W> Unpin for OutputWriter<W>
impl<W> UnsafeUnpin for OutputWriter<W>
impl<W> UnwindSafe for OutputWriter<W>
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more