Struct testanything::tap_writer::TapWriter
source · [−]pub struct TapWriter {
pub name: String,
}
Expand description
A named TAP stream writer. This will print directly to STDOUT as you call methods. No waiting. See examples/stream.rs for usage.
Fields
name: String
TAP stream name
Implementations
sourceimpl TapWriter
impl TapWriter
sourcepub fn new(name: &str) -> TapWriter
pub fn new(name: &str) -> TapWriter
Make me a new one from a name. Don’t leave the name blank as it improves clarity.
sourcepub fn plan(&self, start: i32, finish: i32)
pub fn plan(&self, start: i32, finish: i32)
Print out the plan like “1..5”. If you don’t know the plan ahead of time, it can come at the very end.
sourcepub fn name(&self)
pub fn name(&self)
Print the suite name as a diagnostic line. Surrounded by blank diagnostic lines because pretty.
sourcepub fn diagnostic(&self, message: &str)
pub fn diagnostic(&self, message: &str)
Emit a diagnostic message. Prefaced with a #.
sourcepub fn bail_out(&self)
pub fn bail_out(&self)
Emergency stop! This should be the last thing in the TAP stream. Nothing may come after it.
sourcepub fn bail_out_with_message(&self, message: &str)
pub fn bail_out_with_message(&self, message: &str)
In case you want to bail out with a message. Please use this instead of plain bail_out
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TapWriter
impl Send for TapWriter
impl Sync for TapWriter
impl Unpin for TapWriter
impl UnwindSafe for TapWriter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more