pub struct PushReplyAwaiter { /* private fields */ }Expand description
Awaits the correlated reply to a single server-initiated push.
Returned by ConnectionSupervisor::push_to_connection. The reply slot is
resolved when the originating connection process receives a PushReply frame
carrying the same correlation id, so PushReplyAwaiter::receive blocks
(bounded) for that one correlated answer.
Implementations§
Source§impl PushReplyAwaiter
impl PushReplyAwaiter
Sourcepub const fn correlation_id(&self) -> u64
pub const fn correlation_id(&self) -> u64
Returns the correlation id this awaiter is matched on.
Sourcepub fn receive(&self, timeout: Duration) -> Result<Vec<u8>, ServerError>
pub fn receive(&self, timeout: Duration) -> Result<Vec<u8>, ServerError>
Blocks up to timeout for the client’s correlated reply payload.
§Errors
Returns ServerError::PushReplyTimeout when no reply arrives within
timeout (the worker is connected but slow), or
ServerError::PushReplyDisconnected when the connection process dropped
the reply slot (the connection closed — the prompt worker-death signal).
The two are distinct variants so callers classify by type, not message.