Module writer

Source
Available on crate features fmt and std only.
Expand description

Abstractions for creating io::Write instances.

Structs§

BoxMakeWriter
A writer that erases the specific io::Write and MakeWriter types being used.
MutexGuardWriter
A type implementing io::Write for a MutexGuard where the type inside the Mutex implements io::Write.
OrElse
Combines a MakeWriter that returns an OptionalWriter with another MakeWriter, so that the second MakeWriter is used when the first MakeWriter returns OptionalWriter::none.
Tee
Combines two types implementing MakeWriter (or std::io::Write) to produce a writer that writes to both MakeWriter’s returned writers.
TestWriter
A writer intended to support libtest’s output capturing for use in unit tests.
WithFilter
A MakeWriter combinator that wraps a MakeWriter with a predicate for span and event Metadata, so that the MakeWriter::make_writer_for method returns OptionalWriter::some when the predicate returns true, and OptionalWriter::none when the predicate returns false.
WithMaxLevel
A MakeWriter combinator that only returns an enabled writer for spans and events with metadata at or below a specified verbosity Level.
WithMinLevel
A MakeWriter combinator that only returns an enabled writer for spans and events with metadata at or above a specified verbosity Level.

Enums§

EitherWriter
A writer that is one of two types implementing io::Write.

Traits§

MakeWriter
A type that can create io::Write instances.
MakeWriterExt
Extension trait adding combinators for working with types implementing MakeWriter.

Type Aliases§

OptionalWriter
A writer which may or may not be enabled.