Trait garage_api::common_error::OkOrBadRequest
source · pub trait OkOrBadRequest {
type S;
// Required method
fn ok_or_bad_request<M: AsRef<str>>(
self,
reason: M
) -> Result<Self::S, CommonError>;
}
Expand description
Trait to map error to the Bad Request error code
Required Associated Types§
Required Methods§
fn ok_or_bad_request<M: AsRef<str>>( self, reason: M ) -> Result<Self::S, CommonError>
Object Safety§
This trait is not object safe.