pub struct MapState<S, St> { /* private fields */ }Expand description
A service that substitutes fixed state for the outer pipeline state.
Trait Implementations§
Source§impl<OtSt, S, St, Req> Service<OtSt, Req> for MapState<S, St>where
S: Service<St, Req>,
impl<OtSt, S, St, Req> Service<OtSt, Req> for MapState<S, St>where
S: Service<St, Req>,
Source§type Error = <S as Service<St, Req>>::Error
type Error = <S as Service<St, Req>>::Error
Error produced while checking readiness or processing a request.
Source§async fn call(
&self,
req: Req,
ctx: Ctx<'_, Self, OtSt>,
) -> Result<S::Res, S::Error>
async fn call( &self, req: Req, ctx: Ctx<'_, Self, OtSt>, ) -> Result<S::Res, S::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(&self, ctx: Ctx<'_, Self, OtSt>) -> Result<(), S::Error>
async fn ready(&self, ctx: Ctx<'_, Self, OtSt>) -> Result<(), S::Error>
Waits until the service is ready to process a request. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Auto Trait Implementations§
impl<S, St> Freeze for MapState<S, St>
impl<S, St> RefUnwindSafe for MapState<S, St>where
S: RefUnwindSafe,
St: RefUnwindSafe,
impl<S, St> Send for MapState<S, St>
impl<S, St> Sync for MapState<S, St>
impl<S, St> Unpin for MapState<S, St>
impl<S, St> UnsafeUnpin for MapState<S, St>where
S: UnsafeUnpin,
St: UnsafeUnpin,
impl<S, St> UnwindSafe for MapState<S, St>where
S: UnwindSafe,
St: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
impl<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
Source§fn into_service(self) -> S
fn into_service(self) -> S
Converts this value into a service.