Skip to content

Commit

Permalink
subscriber: impl Layer for FilterFn and DynFilterFn (tokio-rs#1546)
Browse files Browse the repository at this point in the history
## Motivation

Currently, the `FilterFn` and `DynFilterFn` filters are only usable as
`Filter`s for per-layer filtering. However, there's no real reason they
can't _also_ have `Layer` implementations, making them usable as global
filters as well.

## Solution

This branch adds `Layer` implementations to `FilterFn` and
`DynFilterFn`, and moves them into their own file. It also changes the
feature flagging so that the "registry" feature is only required for the
`Filter` implementations --- the types themselves don't involve any
feature-flagged code, only the `Filter` trait.

Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw authored and kaffarell committed May 22, 2024
1 parent a468a60 commit 83ca4a1
Showing 1 changed file with 1 addition and 649 deletions.
Loading

0 comments on commit 83ca4a1

Please sign in to comment.