Enum BytesRejection
#[non_exhaustive]
pub enum BytesRejection
Rejection used for Bytes.
Contains one variant for each way the Bytes extractor
can fail.
Variants
-
FailedToBufferBody(FailedToBufferBody)
Implementations
impl BytesRejection
fn body_text(&self) -> StringGet the response body text used for this rejection.
fn status(&self) -> StatusCodeGet the status code used for this rejection.
Trait Implementations
impl Debug for BytesRejection
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for BytesRejection
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Error for BytesRejection
fn source(&self) -> Option<&dyn Error + 'static>
impl From<FailedToBufferBody> for BytesRejection
fn from(inner: FailedToBufferBody) -> Self
impl IntoResponse for BytesRejection
fn into_response(self) -> Response
Auto Trait Implementations
impl !RefUnwindSafe for BytesRejection
impl !UnwindSafe for BytesRejection
impl Freeze for BytesRejection
impl Send for BytesRejection
impl Sync for BytesRejection
impl Unpin for BytesRejection
impl UnsafeUnpin for BytesRejection
Blanket Implementations
impl<T> Any for BytesRejection
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for BytesRejection
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for BytesRejection
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for BytesRejection
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for BytesRejection
impl<T> ToString for BytesRejection
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T> WithSubscriber for BytesRejection
impl<T, U> Into<U> for BytesRejection
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for BytesRejection
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for BytesRejection
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>