mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-27 20:31:32 -08:00
implement AsRef for ClientMiddleware. This grants access to the inner reqwest client
This commit is contained in:
parent
f310cb8604
commit
92c666ec3e
1 changed files with 9 additions and 0 deletions
|
@ -247,6 +247,15 @@ impl fmt::Debug for ClientWithMiddleware {
|
|||
}
|
||||
}
|
||||
|
||||
// Implementing AsRef<Client> for ClientWithMiddleware.
|
||||
//
|
||||
// This allows to use ClientWithMiddleware as a reqwest::Client.
|
||||
impl AsRef<Client> for ClientWithMiddleware {
|
||||
fn as_ref(&self) -> &Client {
|
||||
&self.inner
|
||||
}
|
||||
}
|
||||
|
||||
mod service {
|
||||
use std::{
|
||||
future::Future,
|
||||
|
|
Loading…
Reference in a new issue