[−][src]Trait adventure::request::Request
A generalized request-response interface, regardless how client works.
Because that the type of a client is parametrized, it can be implemented to work with various kind of clients for the same type of the request.
Associated Types
type Response: Response<Ok = Self::Ok, Error = Self::Error>
The type of corresponding responses of this request.
Required methods
Loading content...Provided methods
fn oneshot(self) -> Oneshot<Self> where
Self: Sized,
Self: Sized,
fn retry_if<F>(self, pred: F) -> RetryingTokio<Self, ExponentialBackoff, F> where
Self: Sized,
F: RetrialPredicate<Self>,
Self: Sized,
F: RetrialPredicate<Self>,
Wrap this request to retry if the given predicate returns true
.
It should be called within the tokio execution context,
because the default timer is implemented using tokio_timer
.
fn retry_with_config<T, B, F>(
self,
timer: T,
pred: F,
backoff: B
) -> Retrying<Self, T, B, F> where
Self: Sized,
T: Timer + Unpin,
B: Backoff,
F: RetrialPredicate<Self>,
self,
timer: T,
pred: F,
backoff: B
) -> Retrying<Self, T, B, F> where
Self: Sized,
T: Timer + Unpin,
B: Backoff,
F: RetrialPredicate<Self>,
Wrap this request to retry with customizable options, including the timer implementation.
Implementations on Foreign Types
impl<P, C> Request<C> for Pin<P> where
P: DerefMut + Unpin,
<P as Deref>::Target: Request<C>,
[src]
P: DerefMut + Unpin,
<P as Deref>::Target: Request<C>,
type Response = <<P as Deref>::Target as Request<C>>::Response
fn send(self: Pin<&mut Self>, client: C) -> Self::Response
[src]
impl<R, C> Request<C> for Box<R> where
R: Request<C>,
[src]
Loading content...
R: Request<C>,
Implementors
impl<R, C> Request<C> for Repeat<R> where
R: OneshotRequest<C> + Clone,
[src]
R: OneshotRequest<C> + Clone,
impl<R, T, B, F, C> Request<C> for Retrying<R, T, B, F> where
Self: RetryMethod<C, Response = R::Response> + Clone + Unpin,
R: Request<C>,
R::Response: Unpin,
C: Clone,
[src]
Self: RetryMethod<C, Response = R::Response> + Clone + Unpin,
R: Request<C>,
R::Response: Unpin,
C: Clone,