UriExt

Trait UriExt 

Source
pub trait UriExt {
    // Required method
    fn get_path_segment(&self, index: usize) -> Option<&str>;
}
Expand description

Extension trait for URIs

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl UriExt for Uri

Source§

fn get_path_segment(&self, index: usize) -> Option<&str>

Implementors§