Module matcher

Expand description

matcher utilities for any middleware where need to match on incoming requests within a given Context

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 Request within the given Context matches for router or other middleware purposes.

Functions§

match_fn
Create a MatchFn from a function.