Trait Policy

pub trait Policy<Request>

A policy which describes which requests can be cloned and then whether those requests should be retried.

Required Methods

fn clone_request(&self, req: &Request) -> Option<Request>

Called when the request is first received to determine if the request is retryable.

fn can_retry(&self, req: &Request) -> bool

Called after the hedge timeout to determine if the hedge retry should be issued.