Enum ExtensionRejection

#[non_exhaustive]
pub enum ExtensionRejection

Rejection used for Extension.

Contains one variant for each way the Extension extractor can fail.

Variants

MissingExtension(MissingExtension)

Implementations

impl ExtensionRejection

fn body_text(&self) -> String

Get the response body text used for this rejection.

fn status(&self) -> StatusCode

Get the status code used for this rejection.

Trait Implementations

impl Debug for ExtensionRejection

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for ExtensionRejection

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Error for ExtensionRejection

fn source(&self) -> Option<&dyn Error + 'static>

impl From<MissingExtension> for ExtensionRejection

fn from(inner: MissingExtension) -> Self

impl IntoResponse for ExtensionRejection

fn into_response(self) -> Response

Auto Trait Implementations

impl !RefUnwindSafe for ExtensionRejection

impl !UnwindSafe for ExtensionRejection

impl Freeze for ExtensionRejection

impl Send for ExtensionRejection

impl Sync for ExtensionRejection

impl Unpin for ExtensionRejection

impl UnsafeUnpin for ExtensionRejection

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for ExtensionRejection where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for ExtensionRejection where ST: ?Sized, DT: ?Sized,

impl<T> Any for ExtensionRejection where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ExtensionRejection where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ExtensionRejection where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for ExtensionRejection

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for ExtensionRejection

impl<T> Read<Exclusive, BecauseExclusive> for ExtensionRejection where T: ?Sized,

impl<T> Same for ExtensionRejection

type Output = T;

impl<T> ToString for ExtensionRejection where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T> WithSubscriber for ExtensionRejection

impl<T, U> Into<U> for ExtensionRejection where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ExtensionRejection where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ExtensionRejection where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for ExtensionRejection where V: MultiLane<T>,

fn vzip(self) -> V