pub struct TraceMiddleware;Expand description
Log all incoming requests and responses with tracing spans.
let mut app = tide::Server::new();
app.with(tide_tracing::TraceMiddleware::new());Implementations§
Trait Implementations§
Source§impl Clone for TraceMiddleware
impl Clone for TraceMiddleware
Source§fn clone(&self) -> TraceMiddleware
fn clone(&self) -> TraceMiddleware
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TraceMiddleware
impl Debug for TraceMiddleware
Source§impl Default for TraceMiddleware
impl Default for TraceMiddleware
Source§fn default() -> TraceMiddleware
fn default() -> TraceMiddleware
Returns the “default value” for a type. Read more
Source§impl<State: Clone + Send + Sync + 'static> Middleware<State> for TraceMiddleware
impl<State: Clone + Send + Sync + 'static> Middleware<State> for TraceMiddleware
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously handle the request, and return a response.
Auto Trait Implementations§
impl Freeze for TraceMiddleware
impl RefUnwindSafe for TraceMiddleware
impl Send for TraceMiddleware
impl Sync for TraceMiddleware
impl Unpin for TraceMiddleware
impl UnsafeUnpin for TraceMiddleware
impl UnwindSafe for TraceMiddleware
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