pub trait RouteHandler {
// Required method
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut Request<Body>,
path_parameters: HashMap<String, String>,
request_id: String,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Represents code that will be executed for a given route.
Note: this trait uses the async_trait
crate
Required Methods§
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut Request<Body>,
path_parameters: HashMap<String, String>,
request_id: String,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 mut Request<Body>,
path_parameters: HashMap<String, String>,
request_id: String,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes the handler for the specified HTTP request and pre-parsed path parameters.
Note that implementors can use async_trait
to clean up the signature.