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 Forget for Capture
impl Freeze for Capturewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
I32NotAllOnes: Freeze,
PhantomData<String>: Freeze,
PhantomData<(u64, ())>: Freeze,
PhantomData<bool>: Freeze,
impl Move for Capture
impl RefUnwindSafe for Capturewhere
I32NotAllOnes: RefUnwindSafe,
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capturewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(u64, ())>: UnsafeUnpin,
PhantomData<bool>: UnsafeUnpin,
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