pub struct AuthorizeLayer<Backend, Context = ()>where
Backend: AuthnBackend,{ /* private fields */ }Expand description
A route layer that authorizes an ability using the current axum-login session.
Implementations§
Source§impl<Backend> AuthorizeLayer<Backend>where
Backend: AuthnBackend,
impl<Backend> AuthorizeLayer<Backend>where
Backend: AuthnBackend,
Source§impl<Backend, Context> AuthorizeLayer<Backend, Context>where
Backend: AuthnBackend,
impl<Backend, Context> AuthorizeLayer<Backend, Context>where
Backend: AuthnBackend,
Trait Implementations§
Source§impl<Backend, Context> Clone for AuthorizeLayer<Backend, Context>where
Backend: AuthnBackend,
Context: Clone,
impl<Backend, Context> Clone for AuthorizeLayer<Backend, Context>where
Backend: AuthnBackend,
Context: Clone,
Source§impl<S, Backend, Context> Layer<S> for AuthorizeLayer<Backend, Context>where
Backend: AuthnBackend,
Context: Clone,
impl<S, Backend, Context> Layer<S> for AuthorizeLayer<Backend, Context>where
Backend: AuthnBackend,
Context: Clone,
Auto Trait Implementations§
impl<Backend, Context = ()> !RefUnwindSafe for AuthorizeLayer<Backend, Context>
impl<Backend, Context = ()> !UnwindSafe for AuthorizeLayer<Backend, Context>
impl<Backend, Context> Forget for AuthorizeLayer<Backend, Context>
impl<Backend, Context> Freeze for AuthorizeLayer<Backend, Context>where
Gate<<Backend as AuthnBackend>::User>: Freeze,
Context: Freeze,
PhantomData<fn() -> Backend>: Freeze,
impl<Backend, Context> Move for AuthorizeLayer<Backend, Context>
impl<Backend, Context> Send for AuthorizeLayer<Backend, Context>where
Context: Send,
Gate<<Backend as AuthnBackend>::User>: Send,
PhantomData<fn() -> Backend>: Send,
impl<Backend, Context> Sync for AuthorizeLayer<Backend, Context>where
Context: Sync,
Gate<<Backend as AuthnBackend>::User>: Sync,
PhantomData<fn() -> Backend>: Sync,
impl<Backend, Context> Unpin for AuthorizeLayer<Backend, Context>where
Context: Unpin,
Gate<<Backend as AuthnBackend>::User>: Unpin,
PhantomData<fn() -> Backend>: Unpin,
impl<Backend, Context> UnsafeUnpin for AuthorizeLayer<Backend, Context>where
Gate<<Backend as AuthnBackend>::User>: UnsafeUnpin,
Context: UnsafeUnpin,
PhantomData<fn() -> Backend>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more