pub fn dispatch_request(
        &self,
        request: Request,
        app_name: Option<ApplicationName>,
    ) -> Response {
        if let Some(backend) = self.backends.get(&request.header.provider) {
            if let Err(status) = backend.is_capable(&request) {
                Response::from_request_header(request.header, status)
            } else {
                backend.execute_request(request, app_name)
            }
        } else {
            Response::from_request_header(request.header, ResponseStatus::ProviderNotRegistered)
        }
    }
/// Parses the `provider` field of the request header and attempts to find
/// the backend handler to which the request must be dispatched.
///
/// Returns either the response coming from the backend handler, or a response
/// containing a status code consistent with the error encountered during
/// processing.
Parses the `provider` field of the request header and attempts to find
the backend handler to which the request must be dispatched.

Returns either the response coming from the backend handler, or a response
containing a status code consistent with the error encountered during
processing.
Parses the ` provider ` field of the request header and attempts to find the backend handler to which the request must be dispatched . Returns either the response coming from the backend handler or a response containing a status code consistent with the error encountered during processing .
pub fn dispatch_request(
        &self,
        request: Request,
        app_name: Option<ApplicationName>,
    ) -> Response {
        if let Some(backend) = self.backends.get(&request.header.provider) {
            if let Err(status) = backend.is_capable(&request) {
                Response::from_request_header(request.header, status)
            } else {
                backend.execute_request(request, app_name)
            }
        } else {
            Response::from_request_header(request.header, ResponseStatus::ProviderNotRegistered)
        }
    }
pub fn dispatch_request ( & self , request : Request , app_name : Option < ApplicationName > , ) -> Response { if let Some ( backend ) = self . backends . get ( & request . header . provider ) { if let Err ( status ) = backend . is_capable ( & request ) { Response :: from_request_header ( request . header , status ) } else { backend . execute_request ( request , app_name ) } } else { Response :: from_request_header ( request . header , ResponseStatus :: ProviderNotRegistered ) } }
Parses the `provider` field of the request header and attempts to find
the backend handler to which the request must be dispatched.
Parses the ` provider ` field of the request header and attempts to find the backend handler to which the request must be dispatched .
&self
request
Request
app_name
Option<ApplicationName>
&self
request
Request
app_name
Option<ApplicationName>