pub struct BackEndHandler { /* private fields */ }Expand description
Back end handler component
Component responsible for unmarshalling requests, passing the operation to the provider and marshalling the result.
It also provides assessment capabilities, letting the dispatcher know if it can process a request.
Implementations§
Source§impl BackEndHandler
impl BackEndHandler
Sourcepub fn is_capable(&self, request: &Request) -> Result<()>
pub fn is_capable(&self, request: &Request) -> Result<()>
Assess whether the backend handler-provider pair is capable of handling the request.
§Errors
- if the provider ID can not perform the type of operation, returns
ResponseStatus::PsaErrorNotSupported - if the provider ID does not match, returns
ResponseStatus::WrongProviderId - if the content type does not match, returns
ResponseStatus::ContentTypeNotSupported - if the accept type does not match, returns
ResponseStatus::AcceptTypeNotSupported
Sourcepub fn execute_request(
&self,
request: Request,
app: Option<Application>,
) -> Response
pub fn execute_request( &self, request: Request, app: Option<Application>, ) -> Response
Unmarshall the request body, pass the operation to the provider and marshall the result back.
If any of the steps fails, a response containing an appropriate status code is returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackEndHandler
impl !RefUnwindSafe for BackEndHandler
impl Send for BackEndHandler
impl Sync for BackEndHandler
impl Unpin for BackEndHandler
impl !UnwindSafe for BackEndHandler
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