Trait perseus::Route [−][src]
pub trait Route {
fn match_route(segments: &[&str]) -> Self;
fn match_path(path: &str) -> Self { ... }
}
Expand description
Trait that is implemented for enum
s that can match routes.
This trait should not be implemented manually. Use the Route
derive macro
instead.
Required methods
fn match_route(segments: &[&str]) -> Self
fn match_route(segments: &[&str]) -> Self
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
fn match_path(path: &str) -> Self
fn match_path(path: &str) -> Self
Matches a route with the given path.