Struct gotham::middleware::logger::RequestLogger [−][src]
pub struct RequestLogger { /* fields omitted */ }
Expand description
A struct that can act as a logging middleware for Gotham.
We implement NewMiddleware
here for Gotham to allow us to work with the request
lifecycle correctly. This trait requires Clone
, so that is also included.
Implementations
Trait Implementations
Implementing gotham::middleware::Middleware
allows us to hook into the request chain
in order to correctly log out after a request has executed.
Implementation of NewMiddleware
is required for Gotham middleware.
This will simply dereference the internal state, rather than deriving NewMiddleware
which will clone the structure - should be cheaper for repeated calls.
Returns a new middleware to be used to serve a request.
type Instance = Self
type Instance = Self
The type of Middleware
created by the NewMiddleware
.
Auto Trait Implementations
impl RefUnwindSafe for RequestLogger
impl Send for RequestLogger
impl Sync for RequestLogger
impl Unpin for RequestLogger
impl UnwindSafe for RequestLogger
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more