Struct tower_http::trace::DefaultOnResponse
source · pub struct DefaultOnResponse { /* private fields */ }
Available on crate feature
trace
only.Expand description
The default OnResponse
implementation used by Trace
.
Implementations§
source§impl DefaultOnResponse
impl DefaultOnResponse
sourcepub fn level(self, level: Level) -> Self
pub fn level(self, level: Level) -> Self
Set the [Level
] used for tracing events.
Please note that while this will set the level for the tracing events
themselves, it might cause them to lack expected information, like
request method or path. You can address this using
DefaultMakeSpan::level
.
Defaults to [Level::DEBUG
].
sourcepub fn latency_unit(self, latency_unit: LatencyUnit) -> Self
pub fn latency_unit(self, latency_unit: LatencyUnit) -> Self
Set the LatencyUnit
latencies will be reported in.
Defaults to LatencyUnit::Millis
.
sourcepub fn include_headers(self, include_headers: bool) -> Self
pub fn include_headers(self, include_headers: bool) -> Self
Include response headers on the Event
.
By default headers are not included.
Trait Implementations§
source§impl Clone for DefaultOnResponse
impl Clone for DefaultOnResponse
source§fn clone(&self) -> DefaultOnResponse
fn clone(&self) -> DefaultOnResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DefaultOnResponse
impl Debug for DefaultOnResponse
source§impl Default for DefaultOnResponse
impl Default for DefaultOnResponse
source§impl<B> OnResponse<B> for DefaultOnResponse
impl<B> OnResponse<B> for DefaultOnResponse
Auto Trait Implementations§
impl RefUnwindSafe for DefaultOnResponse
impl Send for DefaultOnResponse
impl Sync for DefaultOnResponse
impl Unpin for DefaultOnResponse
impl UnwindSafe for DefaultOnResponse
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