Skip to main content

after_ready

Function after_ready 

Source
pub async fn after_ready<T, E, RF, Op, OF>(
    ready: RF,
    operation: Op,
) -> Result<T, E>
where RF: Future<Output = Result<(), E>>, Op: FnOnce() -> OF, OF: Future<Output = Result<T, E>>,
Expand description

Run operation only after ready resolves Ok, returning the readiness error unchanged if it does not.

Generic over the result and error so the short-circuit law is unit-testable without pyo3; the RDMA bindings instantiate E = PyErr and this helper never inspects or remaps it. operation is a closure, not an already-started future, so no effect begins before readiness. The typical ready input is PyHandle::wait_completion.