pub struct PipelineStateBinding<St, Req, Res, Err> { /* private fields */ }Expand description
An independently registered handle to a PipelineState.
Implementations§
Source§impl<St, Req, Res, Err> PipelineStateBinding<St, Req, Res, Err>where
St: 'static,
Req: 'static,
Res: 'static,
Err: 'static,
impl<St, Req, Res, Err> PipelineStateBinding<St, Req, Res, Err>where
St: 'static,
Req: 'static,
Res: 'static,
Err: 'static,
Sourcepub fn call<'a>(
&'a self,
req: Req,
st: &'a St,
) -> impl Future<Output = Result<Res, Err>>
pub fn call<'a>( &'a self, req: Req, st: &'a St, ) -> impl Future<Output = Result<Res, Err>>
Waits for readiness, then calls the service with st.
Reuses valid shared readiness without consuming it, regardless of st.
Calls are forwarded even after shutdown has started; see PipelineState.
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Checks whether pipeline shutdown has been initiated.
Sourcepub fn on_notify(&self, callback: &ReadyCallback)
pub fn on_notify(&self, callback: &ReadyCallback)
Registers a callback on the shared pipeline scope, independently of state.
The callback receives 0 for this root scope.
Dropping this binding does not remove the registration.
See PipelineState::on_notify and ReadyCallback for details.
Sourcepub fn bind_to(&self, ctx: &BindCtx<'_>)
pub fn bind_to(&self, ctx: &BindCtx<'_>)
Registers this handle’s pipeline as a readiness dependency.
Call from Service::bind. See PipelineState::bind_to for details.
Sourcepub fn readiness_link(&self) -> ReadyLink
pub fn readiness_link(&self) -> ReadyLink
Returns the shared pipeline’s readiness endpoint.
See PipelineState::readiness_link and ReadyLink.