pub struct AskRequest<R> { /* private fields */ }Expand description
A pending Client::ask: the same per-call options as a SystemOneRequest, and .await
gives the rubric instead of the response.
Implementations§
Source§impl<R: Rubric> AskRequest<R>
impl<R: Rubric> AskRequest<R>
Sourcepub fn retry(self, policy: RetryPolicy) -> Self
pub fn retry(self, policy: RetryPolicy) -> Self
Override the retry policy for this call.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Override the per-attempt timeout for this call.
Sourcepub fn header(self, name: HeaderName, value: HeaderValue) -> Self
pub fn header(self, name: HeaderName, value: HeaderValue) -> Self
Add a header for this call (protected headers still win).
Sourcepub fn extra_body(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn extra_body(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Add a top-level body field; see SystemOneRequest::extra_body.
Trait Implementations§
Source§impl<R: Debug> Debug for AskRequest<R>
impl<R: Debug> Debug for AskRequest<R>
Source§impl<R: Rubric + 'static> IntoFuture for AskRequest<R>
impl<R: Rubric + 'static> IntoFuture for AskRequest<R>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <AskRequest<R> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <AskRequest<R> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<R> !RefUnwindSafe for AskRequest<R>
impl<R> !UnwindSafe for AskRequest<R>
impl<R> Freeze for AskRequest<R>
impl<R> Send for AskRequest<R>
impl<R> Sync for AskRequest<R>
impl<R> Unpin for AskRequest<R>
impl<R> UnsafeUnpin for AskRequest<R>
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