Expand description
A PathRewriter instance defines a rule to rewrite the request path.
A “path” does not include a query. See http::uri::Uri.
Structs§
- Append
Prefix - Appends a prefix.
- Append
Suffix - Appends a suffix.
- Func
- Converts the
pathby a function. - Identity
- Identity function, that is, this returns the
pathas is. - Regex
All RegexAll(re, new)replaces all matchesrewithnew.- RegexN
RegexN(re, new, n)replaces firstnmatchesrewithnew.- Replace
All ReplaceAll(old, new)replaces all matchesoldwithnew.- ReplaceN
ReplaceN(old, new, n)replaces firstnmatchesoldwithnew.- Static
- Returns
self.0regardless what thepathis. - Trim
Prefix - Trims a prefix if exists.
- Trim
Suffix - Trims a suffix if exists.
Traits§
- Path
Rewriter - Represents a rule to rewrite a path
/foo/bar/bazto new one.