pub struct LoggingMiddleware { /* private fields */ }Expand description
Logging middleware: emits one line to stderr before each request and one
line after each response.
§Example
use oxihttp_client::middleware::LoggingMiddleware;
let mw = LoggingMiddleware::new("api-client");Implementations§
Trait Implementations§
Source§impl ClientMiddleware for LoggingMiddleware
impl ClientMiddleware for LoggingMiddleware
Source§fn before_request(&self, ctx: &RequestContext<'_>)
fn before_request(&self, ctx: &RequestContext<'_>)
Called immediately before the first network attempt.
Source§fn after_response(&self, ctx: &ResponseContext)
fn after_response(&self, ctx: &ResponseContext)
Called after a successful response is obtained (including after retries).
Auto Trait Implementations§
impl Freeze for LoggingMiddleware
impl RefUnwindSafe for LoggingMiddleware
impl Send for LoggingMiddleware
impl Sync for LoggingMiddleware
impl Unpin for LoggingMiddleware
impl UnsafeUnpin for LoggingMiddleware
impl UnwindSafe for LoggingMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more