Skip to main content

GatekeepRejection

Enum GatekeepRejection 

Source
pub enum GatekeepRejection<Resolve, Audit> {
    Denied(DenialResponse),
    Error(GatekeepAxumError<Resolve, Audit>),
}
Expand description

Axum rejection returned by crate::Gatekeeper::authorize.

Variants§

§

Denied(DenialResponse)

The policy denied the request.

§

Error(GatekeepAxumError<Resolve, Audit>)

The authorization boundary failed before a response could be trusted.

Trait Implementations§

Source§

impl<Resolve: Debug, Audit: Debug> Debug for GatekeepRejection<Resolve, Audit>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<Resolve, Audit> From<DenialResponse> for GatekeepRejection<Resolve, Audit>

Source§

fn from(response: DenialResponse) -> Self

Converts to this type from the input type.
Source§

impl<Resolve, Audit> From<GatekeepAxumError<Resolve, Audit>> for GatekeepRejection<Resolve, Audit>

Source§

fn from(error: GatekeepAxumError<Resolve, Audit>) -> Self

Converts to this type from the input type.
Source§

impl<Resolve, Audit> IntoResponse for GatekeepRejection<Resolve, Audit>

Source§

fn into_response(self) -> Response

Create a response.

Auto Trait Implementations§

§

impl<Resolve, Audit> !RefUnwindSafe for GatekeepRejection<Resolve, Audit>

§

impl<Resolve, Audit> !UnwindSafe for GatekeepRejection<Resolve, Audit>

§

impl<Resolve, Audit> Freeze for GatekeepRejection<Resolve, Audit>
where Audit: Freeze, Resolve: Freeze,

§

impl<Resolve, Audit> Send for GatekeepRejection<Resolve, Audit>
where Audit: Send, Resolve: Send,

§

impl<Resolve, Audit> Sync for GatekeepRejection<Resolve, Audit>
where Audit: Sync, Resolve: Sync,

§

impl<Resolve, Audit> Unpin for GatekeepRejection<Resolve, Audit>
where Audit: Unpin, Resolve: Unpin,

§

impl<Resolve, Audit> UnsafeUnpin for GatekeepRejection<Resolve, Audit>
where Audit: UnsafeUnpin, Resolve: UnsafeUnpin,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.