Commit 6def3c5
committed
subscriber: add
This backports #1274 from `master`.
Depends on #1141.
This branch adds a `MakeWriterExt` trait which adds a number of
combinators for composing multiple types implementing `MakeWriter`.
`MakeWriter`s can now be teed together, filtered with minimum and
maximum levels, filtered with a `Metadata` predicate, and combined with
a fallback for when a writer is _not_ made for a particular `Metadata`.
I've also added a `MakeWriter` impl for `Arc<W>` when `&W` implements
`Write`. This enables `File`s to be used as `MakeWriter`s similarly to
how we will be able to in 0.3, with the additional overhead of having to
do ref-counting because we can't return a reference from `MakeWriter`
until the next breaking change.
Signed-off-by: Eliza Weisman <eliza@buoyant.io>MakeWriter combinators (#1274)1 parent bf8d026 commit 6def3c5
3 files changed
+958
-44
lines changed
0 commit comments