pub trait Route: Sized {
    fn match_route(segments: &[&str]) -> Self;

    fn match_path(path: &str) -> Self { ... }
}
Expand description

Trait that is implemented for enums that can match routes.

This trait should not be implemented manually. Use the Route derive macro instead.

Required methods

Matches a route with the given path segments. Note that in general, empty segments should be filtered out before passed as an argument.

It is likely that you are looking for the Route::match_path method instead.

Provided methods

Matches a route with the given path.

Implementors