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 more