pub struct Dispatcher { /* private fields */ }Expand description
Dispatcher to backend
Component tasked with identifying the backend handler that can service a request.
As such, it owns all the backend handlers and attempts to match the fields in the request header to the properties of the handlers.
Implementations§
Source§impl Dispatcher
impl Dispatcher
Sourcepub fn dispatch_request(
&self,
request: Request,
app: Option<Application>,
) -> Response
pub fn dispatch_request( &self, request: Request, app: Option<Application>, ) -> Response
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dispatcher
impl !RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl !UnwindSafe for Dispatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more