#[non_exhaustive]pub enum AuthResponse {
Config(AuthConfig),
User(UserInfo),
Users(Vec<UserEntry>),
CreatedUser(CreatedUser),
Link(Link),
RegisterInfo(RegisterInfo),
Cloudflare(CloudflareConfig),
Done,
}alloc only.Expand description
The answer to an AuthRequest, one variant per type of answer.
Like the request, this is plumbing: each transport answers with the
value a variant carries, as that route or endpoint has always answered.
With the axum08 feature it is an IntoResponse, and with musliweb05
it encodes as the value it carries, the response of the musli-web
endpoint for its request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Config(AuthConfig)
The answer to AuthRequest::Config.
User(UserInfo)
A user: the signed-in one for Me, the account
operations and the sign-ins, or the one an admin operation changed.
Users(Vec<UserEntry>)
The answer to AuthRequest::Users.
CreatedUser(CreatedUser)
The answer to AuthRequest::CreateUser.
Link(Link)
The answer to AuthRequest::IssueLink.
RegisterInfo(RegisterInfo)
The answer to AuthRequest::RegisterInfo.
Cloudflare(CloudflareConfig)
The Cloudflare Access settings, the answer to
Cloudflare and
SetCloudflare.
Done
Done, with nothing to answer: HTTP’s 204, musli-web’s ().
Trait Implementations§
Source§impl Clone for AuthResponse
impl Clone for AuthResponse
Source§impl Debug for AuthResponse
impl Debug for AuthResponse
Source§impl<M> Encode<M> for AuthResponsewhere
M: 'static,
AuthConfig: Encode<M>,
UserInfo: Encode<M>,
Vec<UserEntry>: Encode<M>,
CreatedUser: Encode<M>,
Link: Encode<M>,
RegisterInfo: Encode<M>,
CloudflareConfig: Encode<M>,
(): Encode<M>,
Available on crate feature musliweb05 only.Encodes as the value the variant carries, () for
Done: the response of the musli-web endpoint
that answers the request. There is no Decode; a client decodes the
endpoint’s own response type.
impl<M> Encode<M> for AuthResponsewhere
M: 'static,
AuthConfig: Encode<M>,
UserInfo: Encode<M>,
Vec<UserEntry>: Encode<M>,
CreatedUser: Encode<M>,
Link: Encode<M>,
RegisterInfo: Encode<M>,
CloudflareConfig: Encode<M>,
(): Encode<M>,
musliweb05 only.Encodes as the value the variant carries, () for
Done: the response of the musli-web endpoint
that answers the request. There is no Decode; a client decodes the
endpoint’s own response type.
Source§type Encode = AuthResponse
type Encode = AuthResponse
Source§fn encode<E>(&self, encoder: E) -> Result<(), E::Error>where
E: Encoder<Mode = M>,
fn encode<E>(&self, encoder: E) -> Result<(), E::Error>where
E: Encoder<Mode = M>,
Source§const IS_BITWISE_ENCODE: bool = false
const IS_BITWISE_ENCODE: bool = false
impl Eq for AuthResponse
Source§impl IntoResponse for AuthResponse
Available on crate feature axum08 only.Answers with the value the response carries as its JSON body, and
Done with 204 No Content, as watchword’s routes
do.
impl IntoResponse for AuthResponse
axum08 only.Answers with the value the response carries as its JSON body, and
Done with 204 No Content, as watchword’s routes
do.
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Source§impl PartialEq for AuthResponse
impl PartialEq for AuthResponse
impl StructuralPartialEq for AuthResponse
Auto Trait Implementations§
impl Freeze for AuthResponse
impl RefUnwindSafe for AuthResponse
impl Send for AuthResponse
impl Sync for AuthResponse
impl Unpin for AuthResponse
impl UnsafeUnpin for AuthResponse
impl UnwindSafe for AuthResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> EncodeBody for T
Source§impl<T, S> Handler<IntoResponseHandler, S> for T
impl<T, S> Handler<IntoResponseHandler, S> for T
Source§fn call(
self,
_req: Request<Body>,
_state: S,
) -> <T as Handler<IntoResponseHandler, S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
tower::Layer to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Service by providing the stateSource§impl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
Source§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Service and no state.Source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
MakeService and no state. Read more