/// Strip the path prefix of the request path.
///
/// If there is a path prefix defined and `strip_prefix` returns `None`,
/// return None. Otherwise return the path with the prefix stripped.
Strip the path prefix of the request path.
If there is a path prefix defined and `strip_prefix` returns `None`,
return None. Otherwise return the path with the prefix stripped.
Strip the path prefix of the request path . If there is a path prefix defined and ` strip_prefix ` returns ` None ` return None . Otherwise return the path with the prefix stripped .
fn strip_path_prefix<'a, P: AsRef<Path>>(&self, path: &'a P) -> Option<&'a Path> {
        let path = path.as_ref();
        match self.args.path_prefix.as_deref() {
            Some(prefix) => {
                let prefix = prefix.trim_start_matches('/');
                path.strip_prefix(prefix).ok()
            }
            None => Some(path),
        }
    }
fn strip_path_prefix < ' a , P : AsRef < Path > > ( & self , path : & ' a P ) -> Option < & ' a Path > { let path = path . as_ref ( ) ; match self . args . path_prefix . as_deref ( ) { Some ( prefix ) => { let prefix = prefix . trim_start_matches ( '/' ) ; path . strip_prefix ( prefix ) . ok ( ) } None => Some ( path ) , } }
Strip the path prefix of the request path.
Strip the path prefix of the request path .
&self
path
&'a P