Git Product home page Git Product logo

reqwest-retry-after's Introduction

reqwest-retry-after's People

Contributors

dependabot[bot] avatar melotic avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar

reqwest-retry-after's Issues

RetryAfterMiddleware missing trait?

Pretty new to Rust so apologies if I am holding the tool wrong.
But I am trying to do the minimal example from the docs and I am getting this:

error[E0277]: expected a `Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, Next<'a>)>` closure, found `RetryAfterMiddleware`
  --> mylib\src\lib.rs:32:15
   |
32 |         .with(retry_after_middleware)
   |          ---- ^^^^^^^^^^^^^^^^^^^^^^ expected an `Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, Next<'a>)>` closure, found `RetryAfterMiddleware`
   |          |
   |          required by a bound introduced by this call
   |
   = help: the trait `for<'a> Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, Next<'a>)>` is not implemented for `RetryAfterMiddleware`
   = note: required for `RetryAfterMiddleware` to implement `reqwest_middleware::Middleware`
note: required by a bound in `reqwest_middleware::ClientBuilder::with`
  --> C:\Users\username\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-middleware-0.2.2\src\client.rs:39:12
   |
37 |     pub fn with<M>(self, middleware: M) -> Self
   |            ---- required by a bound in this associated function
38 |     where
39 |         M: Middleware,
   |            ^^^^^^^^^^ required by this bound in `ClientBuilder::with`

repro:

use reqwest_middleware::{ClientBuilder, ClientWithMiddleware};
use reqwest_retry_after::RetryAfterMiddleware;

let client = ClientBuilder::new(reqwest::Client::new())
    .with(RetryAfterMiddleware::new())
    .build();

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • async-trait 0.1.77
  • reqwest 0.11.23
  • reqwest-middleware 0.2.4
  • tokio 1.35.1
  • task-local-extensions 0.1.4
  • tokio 1.35.1
  • httpmock 0.7.0
github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions-rs/toolchain v1
  • actions-rs/cargo v1
  • actions/checkout v4
  • actions-rs/toolchain v1
  • actions-rs/cargo v1
  • actions/checkout v4
  • actions-rs/toolchain v1
  • actions-rs/cargo v1
  • actions/checkout v4
  • actions-rs/toolchain v1
  • actions-rs/clippy-check v1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.