Struct ChallengeClient
pub struct ChallengeClient<T> { /* private fields */ }Implementations§
§impl<T> ChallengeClient<T>
impl<T> ChallengeClient<T>
pub fn new(inner: T) -> ChallengeClient<T>
pub fn with_origin(inner: T, origin: Uri) -> ChallengeClient<T>
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> ChallengeClient<InterceptedService<T, F>>
pub fn send_compressed(
self,
encoding: CompressionEncoding,
) -> ChallengeClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding, ) -> ChallengeClient<T>
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
pub fn accept_compressed(
self,
encoding: CompressionEncoding,
) -> ChallengeClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> ChallengeClient<T>
Enable decompressing responses.
pub fn max_decoding_message_size(self, limit: usize) -> ChallengeClient<T>
pub fn max_decoding_message_size(self, limit: usize) -> ChallengeClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
pub fn max_encoding_message_size(self, limit: usize) -> ChallengeClient<T>
pub fn max_encoding_message_size(self, limit: usize) -> ChallengeClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn answer_challenge(
&mut self,
request: impl IntoRequest<AnswerChallengeRequest>,
) -> Result<Response<AnswerChallengeResponse>, Status>
pub async fn answer_challenge( &mut self, request: impl IntoRequest<AnswerChallengeRequest>, ) -> Result<Response<AnswerChallengeResponse>, Status>
Submit proof of a challenge completion.
Some server endpoints (the “send message” endpoint, for example) may return a response indicating the client must complete a challenge before continuing. Clients may use this endpoint to provide proof of a completed challenge. If successful, the client may then continue their original operation.
pub async fn request_push_challenge(
&mut self,
request: impl IntoRequest<RequestPushChallengeRequest>,
) -> Result<Response<RequestPushChallengeResponse>, Status>
pub async fn request_push_challenge( &mut self, request: impl IntoRequest<RequestPushChallengeRequest>, ) -> Result<Response<RequestPushChallengeResponse>, Status>
Requests that a challenge value be sent to the authenticated account’s primary device via push notification. Once received, callers may present the challenge value via the HandleChallengeResponse RPC.
APNs challenge payloads will be formatted as follows:
{
"aps": {
"sound": "default",
"alert": {
"loc-key": "APN_Message"
}
},
"rateLimitChallenge": "{CHALLENGE_TOKEN}"
}FCM challenge payloads will be formatted as follows:
{"rateLimitChallenge": "{CHALLENGE_TOKEN}"}Trait Implementations§
§impl<T> Clone for ChallengeClient<T>where
T: Clone,
impl<T> Clone for ChallengeClient<T>where
T: Clone,
§fn clone(&self) -> ChallengeClient<T>
fn clone(&self) -> ChallengeClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for ChallengeClient<T>
impl<T> RefUnwindSafe for ChallengeClient<T>where
T: RefUnwindSafe,
impl<T> Send for ChallengeClient<T>where
T: Send,
impl<T> Sync for ChallengeClient<T>where
T: Sync,
impl<T> Unpin for ChallengeClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for ChallengeClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ChallengeClient<T>where
T: UnwindSafe,
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
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].