[−][src]Enum oxide_auth::frontends::actix::ResourceProtection
A wrapper around a result allowing more specific interpretation.
Simplifies trait semantics while also providing additional documentation on the semantics of
each variant. Conversion to a standard Result is of course easily possible.
Variants
Respond(W)The error response to the failed access should be based on this.
Ensures that the WWW-Authenticate header is set on the response and also has the status
code already set. While you should use this as a nice helper, it isn't exactly mandatory to
actually send a response based on this. Just don't allow access to the underlying resource.
Error(W::Error)Something went wrong while checking access.
This is an internal server error (or a library issue) but it's not always wise to directly
indicate this to clients. The OAuthError variants help with this and OAuthFailure also
provides some sensible choices.
Methods
impl<W: WebResponse> ResourceProtection<W>[src]
pub fn into_result(self) -> Result<W, W::Error>[src]
Turn self into a standard error.
Auto Trait Implementations
impl<W> Unpin for ResourceProtection<W> where
W: Unpin,
<W as WebResponse>::Error: Unpin,
W: Unpin,
<W as WebResponse>::Error: Unpin,
impl<W> Send for ResourceProtection<W> where
W: Send,
<W as WebResponse>::Error: Send,
W: Send,
<W as WebResponse>::Error: Send,
impl<W> Sync for ResourceProtection<W> where
W: Sync,
<W as WebResponse>::Error: Sync,
W: Sync,
<W as WebResponse>::Error: Sync,
impl<W> RefUnwindSafe for ResourceProtection<W> where
W: RefUnwindSafe,
<W as WebResponse>::Error: RefUnwindSafe,
W: RefUnwindSafe,
<W as WebResponse>::Error: RefUnwindSafe,
impl<W> UnwindSafe for ResourceProtection<W> where
W: UnwindSafe,
<W as WebResponse>::Error: UnwindSafe,
W: UnwindSafe,
<W as WebResponse>::Error: UnwindSafe,
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,