pub fn is_capable(&self, request: &Request) -> Result<()> {
        let header = &request.header;

        if header.provider != self.provider_id {
            Err(ResponseStatus::WrongProviderID)
        } else if header.content_type != self.content_type {
            Err(ResponseStatus::ContentTypeNotSupported)
        } else if header.accept_type != self.accept_type {
            Err(ResponseStatus::AcceptTypeNotSupported)
        } else {
            Ok(())
        }
    }
/// Assess whether the backend handler-provider pair is capable of handling
/// the request.
///
/// # Errors
/// - 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`
Assess whether the backend handler-provider pair is capable of handling
the request.
Assess whether the backend handler - provider pair is capable of handling the request .
pub fn is_capable(&self, request: &Request) -> Result<()> {
        let header = &request.header;
        if header.provider != self.provider_id {
            Err(ResponseStatus::WrongProviderID)
        } else if header.content_type != self.content_type {
            Err(ResponseStatus::ContentTypeNotSupported)
        } else if header.accept_type != self.accept_type {
            Err(ResponseStatus::AcceptTypeNotSupported)
        } else {
            Ok(())
        }
    }
pub fn is_capable ( & self , request : & Request ) -> Result < ( ) > { let header = & request . header ; if header . provider != self . provider_id { Err ( ResponseStatus :: WrongProviderID ) } else if header . content_type != self . content_type { Err ( ResponseStatus :: ContentTypeNotSupported ) } else if header . accept_type != self . accept_type { Err ( ResponseStatus :: AcceptTypeNotSupported ) } else { Ok ( ( ) ) } }
Assess whether the backend handler-provider pair is capable of handling
the request.
Assess whether the backend handler - provider pair is capable of handling the request .
&self
request
&Request
&self
request
&Request
errors
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`
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 `