-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async example doesn't work at all #16
Comments
Did you try adding the I'm not sure how a user is supposed to discover the |
The feature sync-std does fix the default sample. This should definitively be documented. 299 | match (|| async {
| ---------
| |
| doesn't satisfy `<_ as std::ops::FnOnce<()>>::Output = std::result::Result<_, backoff::error::Error<_>>`
| doesn't satisfy `_: backoff::retry::Operation<_, _>`
300 | client.list_stacks(list_stacks_input.clone()).await
301 | }).retry(ExponentialBackoff::default()).await {
| ^^^^^ method not found in `[closure@src/main.rs:299:9: 301:5 client:_, list_stacks_input:_]` |
I think you need to convert the Error type. Try |
@autarchprinceps I'm sorry for taking so long to reply to this issue. Did you manage to solve it eventually? I agree with @sander2's suggestion above, You can find an example here which uses the latest master, reqwest anyhow: https://github.com/ihrwein/backoff-issue-22/blob/main/src/lib.rs |
Closing due to inactivity. |
I tried to apply the async backoff example to my code, but kept running into errors, so I just tried to compile the raw example, but it fails with exactly the same errors.
This code:
causes these errors:
with a cargo toml dependency including backoff = ">=0.2.1"
The text was updated successfully, but these errors were encountered: