Trait http_api_endpoint::RetryableEndpoint [−][src]
pub trait RetryableEndpoint {
type RetryReason: Send + Sync + Clone;
type RenderRequestError: Error + 'static;
type ParseResponseOutput;
type ParseResponseError: Error + 'static;
const MAX_RETRY_COUNT: usize;
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>;
fn next_retry_in(
&self,
retry: &RetryableEndpointRetry<Self::RetryReason>
) -> Duration { ... }
}