Available on crate features
fmt
and std
only.Expand description
Abstractions for creating io::Write
instances.
Structs§
- BoxMake
Writer - A writer that erases the specific
io::Write
andMakeWriter
types being used. - Mutex
Guard Writer - A type implementing
io::Write
for aMutexGuard
where the type inside theMutex
implementsio::Write
. - OrElse
- Combines a
MakeWriter
that returns anOptionalWriter
with anotherMakeWriter
, so that the secondMakeWriter
is used when the firstMakeWriter
returnsOptionalWriter::none
. - Tee
- Combines two types implementing
MakeWriter
(orstd::io::Write
) to produce a writer that writes to bothMakeWriter
’s returned writers. - Test
Writer - A writer intended to support
libtest
’s output capturing for use in unit tests. - With
Filter - A
MakeWriter
combinator that wraps aMakeWriter
with a predicate for span and eventMetadata
, so that theMakeWriter::make_writer_for
method returnsOptionalWriter::some
when the predicate returnstrue
, andOptionalWriter::none
when the predicate returnsfalse
. - With
MaxLevel - A
MakeWriter
combinator that only returns an enabled writer for spans and events with metadata at or below a specified verbosityLevel
. - With
MinLevel - A
MakeWriter
combinator that only returns an enabled writer for spans and events with metadata at or above a specified verbosityLevel
.
Enums§
- Either
Writer - A writer that is one of two types implementing
io::Write
.
Traits§
- Make
Writer - A type that can create
io::Write
instances. - Make
Writer Ext - Extension trait adding combinators for working with types implementing
MakeWriter
.
Type Aliases§
- Optional
Writer - A writer which may or may not be enabled.