Struct ajars_surf::surf::middleware::Logger
source · [−]pub struct Logger { /* private fields */ }
Expand description
Log each request’s duration.
Implementations
Trait Implementations
sourceimpl Middleware for Logger
impl Middleware for Logger
sourcefn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Logger: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request,
client: Client,
next: Next<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Logger: 'async_trait,
Asynchronously handle the request, and return a response.
Auto Trait Implementations
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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