pub(crate) fn new<'r>(path: &'r str) -> Self {
        let segments = Arc::new(
            once("/")
                .chain(path.split('/').filter(|s| !EXCLUDED_SEGMENTS.contains(s)))
                .filter_map(PercentDecoded::new)
                .collect(),
        );

        RequestPathSegments {
            offset: 0,
            segments,
        }
    }
/// Creates a new RequestPathSegments instance by splitting a `Request` URI path.
///
/// Empty segments are skipped when generating the `RequestPathSegments` value, and a leading
/// `/` segment is added to represent the root (and the beginning of traversal). So, a request
/// path of `/some/path/to//my/handler` will be split into segments:
///
/// ```plain
/// ["/", "some", "path", "to", "my", "handler"]
/// ```
Creates a new RequestPathSegments instance by splitting a `Request` URI path.
Empty segments are skipped when generating the `RequestPathSegments` value, and a leading
`/` segment is added to represent the root (and the beginning of traversal).


Creates a new RequestPathSegments instance by splitting a ` Request ` URI path . Empty segments are skipped when generating the ` RequestPathSegments ` value and a leading ` / ` segment is added to represent the root ( and the beginning of traversal ) .
pub(crate) fn new<'r>(path: &'r str) -> Self {
        let segments = Arc::new(
            once("/")
                .chain(path.split('/').filter(|s| !EXCLUDED_SEGMENTS.contains(s)))
                .filter_map(PercentDecoded::new)
                .collect(),
        );
        RequestPathSegments {
            offset: 0,
            segments,
        }
    }
pub ( crate ) fn new < ' r > ( path : & ' r str ) -> Self { let segments = Arc :: new ( once ( " " ) . chain ( path . split ( '/' ) . filter ( | s | ! EXCLUDED_SEGMENTS . contains ( s ) ) ) . filter_map ( PercentDecoded :: new ) . collect ( ) , ) ; RequestPathSegments { offset : 0 , segments , } }
Creates a new RequestPathSegments instance by splitting a `Request` URI path.
Creates a new RequestPathSegments instance by splitting a ` Request ` URI path .
path
&'r str
path
&'r str