pub trait RouteHandler {
    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
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

Represents code that will be executed for a given route.

Note: this trait uses the async_trait crate

Required Methods

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.

Implementors