pub struct ConnectionTrackerLayer { /* private fields */ }Expand description
A Tower layer that wraps a MakeService (or any per-connection service)
to track and log connection lifecycle events.
This should be applied at the server level, wrapping the service factory that produces per-connection services.
Implementations§
Source§impl ConnectionTrackerLayer
impl ConnectionTrackerLayer
Sourcepub fn with_metrics(metrics: ConnectionMetrics) -> Self
pub fn with_metrics(metrics: ConnectionMetrics) -> Self
Create a new ConnectionTrackerLayer with shared metrics.
Sourcepub fn metrics(&self) -> &ConnectionMetrics
pub fn metrics(&self) -> &ConnectionMetrics
Get a reference to the connection metrics.
Trait Implementations§
Source§impl Clone for ConnectionTrackerLayer
impl Clone for ConnectionTrackerLayer
Source§fn clone(&self) -> ConnectionTrackerLayer
fn clone(&self) -> ConnectionTrackerLayer
Returns a duplicate 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 ConnectionTrackerLayer
impl Debug for ConnectionTrackerLayer
Source§impl Default for ConnectionTrackerLayer
impl Default for ConnectionTrackerLayer
Auto Trait Implementations§
impl Freeze for ConnectionTrackerLayer
impl RefUnwindSafe for ConnectionTrackerLayer
impl Send for ConnectionTrackerLayer
impl Sync for ConnectionTrackerLayer
impl Unpin for ConnectionTrackerLayer
impl UnsafeUnpin for ConnectionTrackerLayer
impl UnwindSafe for ConnectionTrackerLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request