pub struct Capture {
pub tmp: PathBuf,
pub seen: u64,
pub acc: Accumulator,
/* private fields */
}Fields§
§tmp: PathBuf§seen: u64Bytes the tool printed, whether or not the file kept them.
acc: AccumulatorImplementations§
Source§impl Capture
impl Capture
Sourcepub fn open(dir: Option<PathBuf>, check: &str) -> Capture
pub fn open(dir: Option<PathBuf>, check: &str) -> Capture
Open <dir>/<check>.<pid>.log.tmp. A failure is remembered, not
returned: the excerpt still works without a file.
Sourcepub fn open_failing_after(
dir: Option<PathBuf>,
check: &str,
fail_after: Option<u64>,
) -> Capture
pub fn open_failing_after( dir: Option<PathBuf>, check: &str, fail_after: Option<u64>, ) -> Capture
Capture::open, with the write failure the tests inject passed in
(only honoured under the test-hooks feature).
Sourcepub fn end_entry(&mut self, exit: Option<i32>, log: Option<&Path>)
pub fn end_entry(&mut self, exit: Option<i32>, log: Option<&Path>)
End the active-run entry: exit is the check’s result (Some(0) for
anything but a failure, None when the check died), and log where
the log now is. A capture dropped without this ends with no exit.
pub fn take(&mut self, bytes: &[u8])
Auto Trait Implementations§
impl Freeze for Capture
impl RefUnwindSafe for Capture
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capture
impl UnwindSafe for Capture
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