pub trait UriExt {
// Required method
fn get_path_segment(&self, index: usize) -> Option<&str>;
}
Expand description
Extension trait for URIs
Required Methods§
Sourcefn get_path_segment(&self, index: usize) -> Option<&str>
fn get_path_segment(&self, index: usize) -> Option<&str>
Get the path segment by index:
http://localhost:4000/some-route/sub-route
/|--------|/|-------|
index 0 index 1