Struct tracing_subscriber::fmt::writer::TestWriter [−][src]
pub struct TestWriter { /* fields omitted */ }
fmt
only.Expand description
A writer intended to support libtest
’s output capturing for use in unit tests.
TestWriter
is used by fmt::Subscriber
or fmt::Layer
to enable capturing support.
cargo test
can only capture output from the standard library’s print!
macro. See
libtest
’s output capturing for more details about output capturing.
Writing to io::stdout
and io::stderr
produces the same results as using
libtest
’s --nocapture
option which may make the results look unreadable.
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
type Writer = Self
type Writer = Self
The concrete io::Write
implementation returned by make_writer
. Read more
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Attempts to write an entire buffer into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Auto Trait Implementations
impl RefUnwindSafe for TestWriter
impl Send for TestWriter
impl Sync for TestWriter
impl Unpin for TestWriter
impl UnwindSafe for TestWriter