pub struct PipelineBinding<Req, Res, Err> { /* private fields */ }Expand description
An independently registered handle to a Pipeline.
Bindings share the pipeline and its readiness state. Cloning a binding registers another handle.
Implementations§
Source§impl<Req, Res, Err> PipelineBinding<Req, Res, Err>where
Req: 'static,
Res: 'static,
Err: 'static,
impl<Req, Res, Err> PipelineBinding<Req, Res, Err>where
Req: 'static,
Res: 'static,
Err: 'static,
Sourcepub async fn ready(&self) -> Result<(), Err>
pub async fn ready(&self) -> Result<(), Err>
Waits until the pipeline is ready to process a request.
A successful check is consumed by the next call, which then skips its own readiness check.
Sourcepub async fn call(&self, req: Req) -> Result<Res, Err>
pub async fn call(&self, req: Req) -> Result<Res, Err>
Waits for readiness, then calls the service.
The readiness check is skipped if the last pipeline readiness check succeeded and no call has started since.
Sourcepub fn call_static(&self, req: Req) -> PipelineCall<Req, Res, Err> ⓘ
pub fn call_static(&self, req: Req) -> PipelineCall<Req, Res, Err> ⓘ
Returns an owned future that waits for readiness and calls the service.
The returned future does not borrow this binding and can be moved between local tasks. The readiness check is skipped if the last pipeline readiness check succeeded and no call has started since; this is decided when the future is first polled.