mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-27 03:16:32 +00:00
added custom Debug implementation for ClientWithMiddleware, skipping middleware_stack field (#22)
This commit is contained in:
parent
525f62039f
commit
6cbea8d7e6
1 changed files with 10 additions and 1 deletions
|
@ -3,7 +3,7 @@ use reqwest::multipart::Form;
|
||||||
use reqwest::{Body, Client, IntoUrl, Method, Request, Response};
|
use reqwest::{Body, Client, IntoUrl, Method, Request, Response};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
use std::fmt::Display;
|
use std::fmt::{self, Display};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use task_local_extensions::Extensions;
|
use task_local_extensions::Extensions;
|
||||||
|
@ -138,6 +138,15 @@ impl From<Client> for ClientWithMiddleware {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for ClientWithMiddleware {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
// skipping middleware_stack field for now
|
||||||
|
f.debug_struct("ClientWithMiddleware")
|
||||||
|
.field("inner", &self.inner)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// This is a wrapper around [`reqwest::RequestBuilder`] exposing the same API.
|
/// This is a wrapper around [`reqwest::RequestBuilder`] exposing the same API.
|
||||||
#[must_use = "RequestBuilder does nothing until you 'send' it"]
|
#[must_use = "RequestBuilder does nothing until you 'send' it"]
|
||||||
pub struct RequestBuilder {
|
pub struct RequestBuilder {
|
||||||
|
|
Loading…
Reference in a new issue