pub trait RetryPolicy<E>: Send + Sync + Debug {
    fn should_retry(&self, error: &E) -> bool;
    fn backoff_hint(&self, error: &E) -> Option<Duration>;
}
Expand description

RetryPolicy defines logic for which JsonRpcClient::Error instances should the client retry the request and try to recover from.

Required Methods§

Whether to retry the request based on the given error

Providers may include the backoff in the error response directly

Implementors§