Skip to main content

Module matcher

Module matcher 

Available on crate features http and std only.
Expand description

service::Matchers implementations to match on rama_http_types::Requests.

See service::matcher module for more information.

Path matchers and the Router use PathPattern syntax ({name}, {*rest}, ? for optional), not RFC 6570; the uri module compares it with the other URI patterns.

Modules§

uri
provides a UriMatcher matcher for matching requests based on their URI.

Structs§

DomainMatcher
Matcher based on the (sub)domain of the request’s URI.
HeaderMatcher
Matcher based on the Request’s headers.
HttpMatcher
A matcher that is used to match an http Request
MethodMatcher
A matcher that matches one or more HTTP methods.
PathMatchPolicy
Typed HTTP path-matching policy used by Router and policy-aware HttpMatcher constructors.
SubdomainTrieMatcher
A matcher that matches subdomains.
UpgradeTokenMatcher
Matches requests opening a protocol by upgrade token, on any HTTP version.
UriMatcher
Matches the request’s URI as text, using a glob (Wildcard: * any run of bytes, ? any one byte) or a regex.
UriParams
Parameters inserted in Extensions when a path matcher matches a Request.
UriParamsDeserializeError
Error that can occur during the deserialization of the UriParams.
VersionMatcher
A matcher that matches one or more HTTP methods.

Enums§

HttpMatcherKind
A matcher that is used to match an http Request
PathCase
ASCII case-comparison policy for HTTP request paths.
PathDecoding
Percent-escape handling policy for HTTP request paths and captures.