Document using `tokio::time::sleep` (#111)

* Document using `tokio::time::sleep`

* Update reqwest-retry/src/middleware.rs

---------

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
pull/112/head
Jan Srzednicki 2023-11-07 10:35:16 +01:00 committed by GitHub
parent 304d6f1ebc
commit b7017dca6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ use task_local_extensions::Extensions;
/// and can be safely executed again.
///
/// Currently, it allows setting a [RetryPolicy] algorithm for calculating the __wait_time__
/// between each request retry.
/// between each request retry. Sleeping on non-`wasm32` archs is performed using
/// [`tokio::time::sleep`], therefore it will respect pauses/auto-advance if run under a
/// runtime that supports them.
///
///```rust
/// use reqwest_middleware::ClientBuilder;