Struct viz_tower::Middleware
source · pub struct Middleware<L, H> { /* private fields */ }
Implementations§
source§impl<L, H> Middleware<L, H>
impl<L, H> Middleware<L, H>
Trait Implementations§
source§impl<L: Clone, H: Clone> Clone for Middleware<L, H>
impl<L: Clone, H: Clone> Clone for Middleware<L, H>
source§fn clone(&self) -> Middleware<L, H>
fn clone(&self) -> Middleware<L, H>
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<O, L, H> Handler<Request<Body>> for Middleware<L, H>where
L: Layer<HandlerService<H>> + Send + Sync + 'static,
H: Handler<Request, Output = Result<Response>> + Clone,
O: HttpBody + Send + 'static,
O::Data: Into<Bytes>,
O::Error: Into<BoxError>,
L::Service: Service<Request, Response = Response<O>> + Send + Sync + 'static,
<L::Service as Service<Request>>::Future: Send,
<L::Service as Service<Request>>::Error: Into<BoxError>,
impl<O, L, H> Handler<Request<Body>> for Middleware<L, H>where
L: Layer<HandlerService<H>> + Send + Sync + 'static,
H: Handler<Request, Output = Result<Response>> + Clone,
O: HttpBody + Send + 'static,
O::Data: Into<Bytes>,
O::Error: Into<BoxError>,
L::Service: Service<Request, Response = Response<O>> + Send + Sync + 'static,
<L::Service as Service<Request>>::Future: Send,
<L::Service as Service<Request>>::Error: Into<BoxError>,
Auto Trait Implementations§
impl<L, H> Freeze for Middleware<L, H>
impl<L, H> RefUnwindSafe for Middleware<L, H>where
L: RefUnwindSafe,
H: RefUnwindSafe,
impl<L, H> Send for Middleware<L, H>
impl<L, H> Sync for Middleware<L, H>
impl<L, H> Unpin for Middleware<L, H>
impl<L, H> UnwindSafe for Middleware<L, H>where
L: UnwindSafe,
H: UnwindSafe,
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<I, T> HandlerExt<I> for T
impl<I, T> HandlerExt<I> for T
source§fn before<F>(self, f: F) -> Before<Self, F>where
Self: Sized,
fn before<F>(self, f: F) -> Before<Self, F>where
Self: Sized,
Maps the input before the handler calls.
source§fn after<F>(self, f: F) -> After<Self, F>where
Self: Sized,
fn after<F>(self, f: F) -> After<Self, F>where
Self: Sized,
Maps the output
Result<T>
after the handler called.source§fn around<F>(self, f: F) -> Around<Self, F>where
Self: Sized,
fn around<F>(self, f: F) -> Around<Self, F>where
Self: Sized,
Wraps around the remaining handler or middleware chain.
source§fn either<R>(self, r: R, enable: bool) -> Either<Self, R>where
Self: Sized,
fn either<R>(self, r: R, enable: bool) -> Either<Self, R>where
Self: Sized,
Wraps this handler in an Either handler, making it the left-hand variant of that Either. Read more
source§fn map<F>(self, f: F) -> Map<Self, F>where
Self: Sized,
fn map<F>(self, f: F) -> Map<Self, F>where
Self: Sized,
Maps the
Ok
value of the output if after the handler called.source§fn map_into_response(self) -> MapInToResponse<Self>where
Self: Sized,
fn map_into_response(self) -> MapInToResponse<Self>where
Self: Sized,
Maps the handler’s output type to the
Response
.source§fn and_then<F>(self, f: F) -> AndThen<Self, F>where
Self: Sized,
fn and_then<F>(self, f: F) -> AndThen<Self, F>where
Self: Sized,
Calls op if the result is Ok, otherwise returns the Err value of self.
source§fn map_err<F>(self, f: F) -> MapErr<Self, F>where
Self: Sized,
fn map_err<F>(self, f: F) -> MapErr<Self, F>where
Self: Sized,
Maps the
Err
value of the output if after the handler called.source§fn or_else<F>(self, f: F) -> OrElse<Self, F>where
Self: Sized,
fn or_else<F>(self, f: F) -> OrElse<Self, F>where
Self: Sized,
Calls
op
if the output is Err
, otherwise returns the Ok
value of the output.source§fn catch_error<F, E, R>(self, f: F) -> CatchError<Self, F, E, R>where
Self: Sized,
fn catch_error<F, E, R>(self, f: F) -> CatchError<Self, F, E, R>where
Self: Sized,
Catches rejected error while calling the handler.
source§fn catch_unwind<F>(self, f: F) -> CatchUnwind<Self, F>where
Self: Sized,
fn catch_unwind<F>(self, f: F) -> CatchUnwind<Self, F>where
Self: Sized,
Catches unwinding panics while calling the handler.
source§fn boxed(self) -> BoxHandler<I, Self::Output>
fn boxed(self) -> BoxHandler<I, Self::Output>
Converts this Handler into a
BoxHandler
.