pub struct HidePath<S, N> { /* private fields */ }Expand description
A wrapper service which forwards to one of two inner services based on if the requested path is contained within its internal router.
Trait Implementations§
Source§impl<ReqBody, S, SResBody, SResBodyError, N, NResBody, NResBodyError> Service<Request<ReqBody>> for HidePath<S, N>where
S: Service<Request<ReqBody>, Response = Response<SResBody>, Error = Infallible> + Clone,
S::Future: Send + 'static,
SResBody: Body<Data = Bytes, Error = SResBodyError> + Send + 'static,
SResBodyError: Into<Box<dyn Error + Send + Sync>>,
N: Service<Request<ReqBody>, Response = Response<NResBody>, Error = Infallible> + Clone,
N::Future: Send + 'static,
NResBody: Body<Data = Bytes, Error = NResBodyError> + Send + 'static,
NResBodyError: Into<Box<dyn Error + Send + Sync>>,
impl<ReqBody, S, SResBody, SResBodyError, N, NResBody, NResBodyError> Service<Request<ReqBody>> for HidePath<S, N>where
S: Service<Request<ReqBody>, Response = Response<SResBody>, Error = Infallible> + Clone,
S::Future: Send + 'static,
SResBody: Body<Data = Bytes, Error = SResBodyError> + Send + 'static,
SResBodyError: Into<Box<dyn Error + Send + Sync>>,
N: Service<Request<ReqBody>, Response = Response<NResBody>, Error = Infallible> + Clone,
N::Future: Send + 'static,
NResBody: Body<Data = Bytes, Error = NResBodyError> + Send + 'static,
NResBodyError: Into<Box<dyn Error + Send + Sync>>,
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = ResponseFuture<<S as Service<Request<ReqBody>>>::Future, <N as Service<Request<ReqBody>>>::Future>
type Future = ResponseFuture<<S as Service<Request<ReqBody>>>::Future, <N as Service<Request<ReqBody>>>::Future>
The future response value.
Auto Trait Implementations§
impl<S, N> Freeze for HidePath<S, N>
impl<S, N> !RefUnwindSafe for HidePath<S, N>
impl<S, N> Send for HidePath<S, N>
impl<S, N> Sync for HidePath<S, N>
impl<S, N> Unpin for HidePath<S, N>
impl<S, N> !UnwindSafe for HidePath<S, N>
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