You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it is not possible to create custom RetryPolicy implementations because the RetryDecision type is not exposed by the crate. So its a bit all or nothing and I can't create a policy that conditionally retry requests.
To Reproduce
This code will not work because the compiler complains about reqwest_retry::RetryDecision not exisiting.
impl reqwest_retry::RetryPolicyforCustomRetryPolicy{fnshould_retry(&self,attempt:u32) -> reqwest_retry::RetryDecision{// Some custom logic determining if the request should be retried.}}
Expected behavior
I expected the above to work.
Environment
OS: Windows
Rust version: 1.67.1
Additional context
I am new to Rust, so please let me know if I am misunderstanding something or if I am using the crate incorrectly.
The text was updated successfully, but these errors were encountered:
Oh, you're right. For now you can work around this, the trait is re-exported from retry-policies, so you can add that to your deps and import it from there instead.
We should re-export RetryDecision as well though, I see no reason not to.
Bug description
Currently, it is not possible to create custom
RetryPolicy
implementations because theRetryDecision
type is not exposed by the crate. So its a bit all or nothing and I can't create a policy that conditionally retry requests.To Reproduce
This code will not work because the compiler complains about
reqwest_retry::RetryDecision
not exisiting.Expected behavior
I expected the above to work.
Environment
Additional context
I am new to Rust, so please let me know if I am misunderstanding something or if I am using the crate incorrectly.
The text was updated successfully, but these errors were encountered: