Skip to main content

PathInputExt

Trait PathInputExt 

pub trait PathInputExt {
    // Required method
    fn path_ref(&self) -> PathRef<'_>;
}
Available on crate feature net only.
Expand description

Read the URI path of a service input.

Implementations should return a typed PathRef and use Uri::path_ref_or_root when the path comes from a Uri, so an empty URI path is observed as / and callers never need to fall back to raw strings.

Required Methods§

fn path_ref(&self) -> PathRef<'_>

The path to route against.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl<T> PathInputExt for &T
where T: PathInputExt + ?Sized,

§

fn path_ref(&self) -> PathRef<'_>

Implementors§

§

impl PathInputExt for Parts

§

impl PathInputExt for Uri

§

impl<Body> PathInputExt for Request<Body>