pub struct LogMiddleware { /* private fields */ }Expand description
Decorate a service by logging all received requests.
Implementations§
Source§impl LogMiddleware
impl LogMiddleware
Sourcepub fn new(target: &'static str) -> LogMiddleware
pub fn new(target: &'static str) -> LogMiddleware
Create a new LogMiddleware instance configured to use target.
Trait Implementations§
Source§impl Debug for LogMiddleware
impl Debug for LogMiddleware
Source§impl<S, RequestBody, ResponseBody> Middleware<S> for LogMiddleware
impl<S, RequestBody, ResponseBody> Middleware<S> for LogMiddleware
Auto Trait Implementations§
impl Freeze for LogMiddleware
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
Source§impl<T, S, B1, B2> HttpMiddleware<S> for Twhere
T: Middleware<S, Request = Request<B1>, Response = Response<B2>>,
B1: BufStream,
B2: BufStream,
impl<T, S, B1, B2> HttpMiddleware<S> for Twhere
T: Middleware<S, Request = Request<B1>, Response = Response<B2>>,
B1: BufStream,
B2: BufStream,
Source§type RequestBody = B1
type RequestBody = B1
The HTTP request body handled by the wrapped service.
Source§type ResponseBody = B2
type ResponseBody = B2
The HTTP response body returned by the wrapped service.
Source§type Error = <T as Middleware<S>>::Error
type Error = <T as Middleware<S>>::Error
The wrapped service’s error type.
Source§type Service = <T as Middleware<S>>::Service
type Service = <T as Middleware<S>>::Service
The wrapped service.
Source§fn wrap_http(&self, inner: S) -> <T as HttpMiddleware<S>>::Service
fn wrap_http(&self, inner: S) -> <T as HttpMiddleware<S>>::Service
Wrap the given service with the middleware, returning a new servicee
that has been decorated with the middleware.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more