pub fn take_correlated<C, K, const N: usize>(
client: &mut C,
buf: &mut [u8],
pending: &mut RequestCorrelator<K, N>,
) -> Result<Option<(usize, i64, K)>, C::Error>Expand description
Take the next reply that answers a pending request, dropping stale ones.
Ok(Some((len, seq, key))) — a reply for the pending request key, its
bytes in buf[..len]. Ok(None) — nothing for a pending request yet (any
stale replies met on the way were dropped, at most
MAX_STALE_DRAIN_PER_POLL per call). Errors pass through unchanged.