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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.