pub trait PathRewriter {
    fn rewrite<'a>(&'a mut self, path: &'a str) -> Cow<'a, str>;

    fn rewrite_uri<B>(
        &mut self,
        req: &mut Request<B>,
        scheme: &Scheme,
        authority: &Authority
    ) -> Result<(), HttpError> { ... } }
Expand description

Represents a rule to rewrite a path /foo/bar/baz to new one.

A “path” does not include a query. See http::uri::Uri.

Required Methods§

Provided Methods§

Implementors§