pub trait Router: Clone {
// Required method
fn handle(
&self,
req: Request,
path: Option<String>,
params: HashMap<String, String>,
) -> RouterResult;
// Provided method
fn router_map(&self) -> Option<RouterMap> { ... }
}
Required Methods§
fn handle( &self, req: Request, path: Option<String>, params: HashMap<String, String>, ) -> RouterResult
Provided Methods§
Sourcefn router_map(&self) -> Option<RouterMap>
fn router_map(&self) -> Option<RouterMap>
Returns a tree of routes by filters
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.