Module matcher

Module matcher 

Expand description

Matcher utilities for any middleware where need to match on incoming inputs.

This module provides the Matcher trait and convenience utilities around it.

Structs§

And
A matcher that matches if all of the inner matchers match.
ExtensionMatcher
A matcher which allows you to match based on an extension, either by comparing with an extension (ExtensionMatcher::with_const), or using a custom predicate (ExtensionMatcher::with_fn).
MatcherRouter
Wrapper type that can be used to turn a tuple of (Matcher, Service) tuples into a single Service.
Not
A matcher that matches if the inner matcher does not match.
Or
A matcher that matches if any of the inner matchers match.

Traits§

IteratorMatcherExt
Extension to apply matcher operations to an Iterator of Matchers.
MatchFn
A MatchFn is a Matcher implemented using a function.
Matcher
A condition to decide whether Input matches for router or other middleware purposes.

Functions§

match_fn
Create a MatchFn from a function.