pub type BoxSvc<Req, Res> = Pin<Box<dyn Svc<Req, Res = Res, Fut = BoxFut<Res>>>>;
Aliased Type§
pub struct BoxSvc<Req, Res> { /* private fields */ }
Trait Implementations§
Source§impl<Req, Res> Svc<Req> for BoxSvc<Req, Res>
impl<Req, Res> Svc<Req> for BoxSvc<Req, Res>
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.