Struct sfo_http::http_server::log::LogMiddleware
source · pub struct LogMiddleware { /* private fields */ }Expand description
Log all incoming requests and responses.
This middleware is enabled by default in Tide. In the case of nested applications, this middleware will only run once for each request.
Examples
let mut app = tide::Server::new();
app.with(tide::log::LogMiddleware::new());Implementations§
source§impl LogMiddleware
impl LogMiddleware
sourcepub fn new() -> LogMiddleware
pub fn new() -> LogMiddleware
Create a new instance of LogMiddleware.
Trait Implementations§
source§impl Clone for LogMiddleware
impl Clone for LogMiddleware
source§fn clone(&self) -> LogMiddleware
fn clone(&self) -> LogMiddleware
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 LogMiddleware
impl Debug for LogMiddleware
source§impl Default for LogMiddleware
impl Default for LogMiddleware
source§fn default() -> LogMiddleware
fn default() -> LogMiddleware
Returns the “default value” for a type. Read more
source§impl<State> Middleware<State> for LogMiddlewarewhere
State: Clone + Send + Sync + 'static,
impl<State> Middleware<State> for LogMiddlewarewhere State: Clone + Send + Sync + 'static,
source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
LogMiddleware: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>( &'life0 self, req: Request<State>, next: Next<'life1, State> ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, LogMiddleware: 'async_trait,
Asynchronously handle the request, and return a response.
Auto Trait Implementations§
impl RefUnwindSafe for LogMiddleware
impl Send for LogMiddleware
impl Sync for LogMiddleware
impl Unpin for LogMiddleware
impl UnwindSafe for LogMiddleware
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