Struct tokio_http2::router::route::route::Route
[−]
[src]
pub struct Route { pub method: Method, pub path: RequestPath, pub handler: Handler, }
Holds route information
Fields
method: Method
HTTP method to match
path: RequestPath
RequestPath to match
handler: Handler
Request handler
This should be method that accepts Request and responds with Response:
Methods
impl Route
[src]
fn options(path: &str) -> RouteBuilder
fn get(path: &str) -> RouteBuilder
fn post(path: &str) -> RouteBuilder
fn put(path: &str) -> RouteBuilder
fn delete(path: &str) -> RouteBuilder
fn head(path: &str) -> RouteBuilder
fn trace(path: &str) -> RouteBuilder
fn connect(path: &str) -> RouteBuilder
fn patch(path: &str) -> RouteBuilder
fn from(method: Method, path: &str) -> RouteBuilder
Trait Implementations
impl Clone for Route
[src]
fn clone(&self) -> Route
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more