Struct tracing_subscriber::fmt::TestWriter[][src]

pub struct TestWriter { /* fields omitted */ }

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

impl TestWriter[src]

pub fn new() -> Self[src]

Returns a new TestWriter with the default configuration.

Trait Implementations

impl Debug for TestWriter[src]

impl Default for TestWriter[src]

impl MakeWriter for TestWriter[src]

type Writer = Self

The concrete io::Write implementation returned by make_writer. Read more

impl Write for TestWriter[src]

Auto Trait Implementations

impl RefUnwindSafe for TestWriter

impl Send for TestWriter

impl Sync for TestWriter

impl Unpin for TestWriter

impl UnwindSafe for TestWriter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]