pub struct WebMiddleware<S, St> { /* private fields */ }Expand description
Trait Implementations§
Source§impl<S, St> Clone for WebMiddleware<S, St>where
S: Clone,
impl<S, St> Clone for WebMiddleware<S, St>where
S: Clone,
Source§impl<S, St, In> Service<St, WebRequest<In>> for WebMiddleware<S, St>where
S: Service<St, WebRequest<In>, Res = WebResponse>,
S::Error: WebResponseError<St, St::Error>,
St: State,
impl<S, St, In> Service<St, WebRequest<In>> for WebMiddleware<S, St>where
S: Service<St, WebRequest<In>, Res = WebResponse>,
S::Error: WebResponseError<St, St::Error>,
St: State,
Source§type Res = WebResponse
type Res = WebResponse
Response produced by the service.
Source§type Error = WebError<St, <St as State>::Error>
type Error = WebError<St, <St as State>::Error>
Error produced while checking readiness or processing a request.
Source§async fn call(
&self,
req: WebRequest<In>,
ctx: Ctx<'_, Self, St>,
) -> Result<Self::Res, Self::Error>
async fn call( &self, req: WebRequest<In>, ctx: Ctx<'_, Self, St>, ) -> Result<Self::Res, Self::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::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 WebMiddleware<S, St>where
S: Freeze,
impl<S, St> RefUnwindSafe for WebMiddleware<S, St>where
S: RefUnwindSafe,
St: RefUnwindSafe,
impl<S, St> Send for WebMiddleware<S, St>
impl<S, St> Sync for WebMiddleware<S, St>
impl<S, St> Unpin for WebMiddleware<S, St>
impl<S, St> UnsafeUnpin for WebMiddleware<S, St>where
S: UnsafeUnpin,
impl<S, St> UnwindSafe for WebMiddleware<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.