pub enum AcceptRejection {
InvalidHeader(ToStrError),
InvalidMediaType(usize, MediaTypeError),
InvalidQ(usize, <f64 as FromStr>::Err),
NoSupportedMediaTypeFound,
}Expand description
The error type returned in the FromRequestParts implementations.
Variants§
InvalidHeader(ToStrError)
The header could not be converted to a &str.
InvalidMediaType(usize, MediaTypeError)
The media type at index .0 could not be parsed.
InvalidQ(usize, <f64 as FromStr>::Err)
Invalid q parameter
NoSupportedMediaTypeFound
No supported media type was found.
Implementations§
Source§impl AcceptRejection
impl AcceptRejection
Sourcepub fn status_and_message(&self) -> (StatusCode, String)
pub fn status_and_message(&self) -> (StatusCode, String)
Get the status and message for an error.
Trait Implementations§
Source§impl Debug for AcceptRejection
impl Debug for AcceptRejection
Source§impl IntoResponse for AcceptRejection
impl IntoResponse for AcceptRejection
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Auto Trait Implementations§
impl Freeze for AcceptRejection
impl RefUnwindSafe for AcceptRejection
impl Send for AcceptRejection
impl Sync for AcceptRejection
impl Unpin for AcceptRejection
impl UnwindSafe for AcceptRejection
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