pub struct MapSvc<S, F, Res> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<S, Req, F, Res> Svc<Req> for MapSvc<S, F, Res>
impl<S, Req, F, Res> Svc<Req> for MapSvc<S, F, Res>
Source§fn exec(self: Pin<&mut Self>, req: Req) -> Self::Fut
fn exec(self: Pin<&mut Self>, req: Req) -> Self::Fut
Processes request, producing a future that outputs the response type.
Source§fn poll_ready(self: Pin<&mut Self>, cx: Context<'_>) -> Poll<()>
fn poll_ready(self: Pin<&mut Self>, cx: Context<'_>) -> Poll<()>
To be called before
exec
to signal wether the service is ready to process requests.
As such, the check should be inexpensive. Returning Poll::Pending
acts as back-pressure.
The default implementation unconditionally indicates the service is ready.impl<'pin, S, F, Res> Unpin for MapSvc<S, F, Res>where
PinnedFieldsOf<__MapSvc<'pin, S, F, Res>>: Unpin,
Auto Trait Implementations§
impl<S, F, Res> Freeze for MapSvc<S, F, Res>
impl<S, F, Res> RefUnwindSafe for MapSvc<S, F, Res>
impl<S, F, Res> Send for MapSvc<S, F, Res>
impl<S, F, Res> Sync for MapSvc<S, F, Res>
impl<S, F, Res> UnwindSafe for MapSvc<S, F, Res>
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