Trait RetryableEndpoint
Source pub trait RetryableEndpoint: DynClone {
type RetryReason: Send + Sync + Clone;
type RenderRequestError: Error + Send + Sync + 'static;
type ParseResponseOutput;
type ParseResponseError: Error + Send + Sync + 'static;
// Required methods
fn render_request(
&self,
retry: Option<&RetryableEndpointRetry<Self::RetryReason>>,
) -> Result<Request<Body>, Self::RenderRequestError>;
fn parse_response(
&self,
response: Response<Body>,
retry: Option<&RetryableEndpointRetry<Self::RetryReason>>,
) -> Result<Result<Self::ParseResponseOutput, Self::RetryReason>, Self::ParseResponseError>;
// Provided methods
fn max_retry_count(&self) -> usize { ... }
fn next_retry_in(
&self,
retry: &RetryableEndpointRetry<Self::RetryReason>,
) -> Duration { ... }
}
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more