Struct tower_http::trace::DefaultOnResponse
source · [−]pub struct DefaultOnResponse { /* private fields */ }
trace
only.Expand description
The default OnResponse
implementation used by Trace
.
Implementations
sourceimpl 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
sourceimpl Clone for DefaultOnResponse
impl Clone for DefaultOnResponse
sourcefn clone(&self) -> DefaultOnResponse
fn clone(&self) -> DefaultOnResponse
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DefaultOnResponse
impl Debug for DefaultOnResponse
sourceimpl Default for DefaultOnResponse
impl Default for DefaultOnResponse
sourceimpl<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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> PolicyExt for T where
T: ?Sized,
impl<T> PolicyExt for T where
T: ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more