warp::filters::path
pub fn path( p: &'static str) -> impl Filter<Extract = (), Error = Rejection> + Copy
Create an exact match path segment Filter.
Filter
This will try to match exactly to the current request path segment.
Exact path filters cannot be empty, or contain slashes.
use warp::Filter; // Matches '/hello' let hello = warp::path("hello") .map(|| "Hello, World!");