pub struct ConnectionConversation { /* private fields */ }Expand description
Library conversation resource owned by a single connection process.
Implementations§
Source§impl ConnectionConversation
impl ConnectionConversation
Sourcepub fn new(resource: Box<dyn ConversationResource>) -> Self
pub fn new(resource: Box<dyn ConversationResource>) -> Self
Creates an owned conversation resource for one connection process.
Sourcepub fn participant_pids(&self) -> Vec<u64>
pub fn participant_pids(&self) -> Vec<u64>
Returns the participant PIDs linked to the supervised conversation.
Sourcepub fn has_detected_crash(&self) -> bool
pub fn has_detected_crash(&self) -> bool
Returns true once a participant crash has been structurally detected through the linked-EXIT mechanism.
Sourcepub fn await_crash(&self, timeout: Duration) -> Option<Instant>
pub fn await_crash(&self, timeout: Duration) -> Option<Instant>
Blocks (event-driven) up to timeout for a structural crash signal.
Sourcepub fn receive_reply(
&self,
timeout: Duration,
) -> Result<MessageEnvelope, ServerError>
pub fn receive_reply( &self, timeout: Duration, ) -> Result<MessageEnvelope, ServerError>
Receives the next participant reply for this conversation, bounded by
timeout.
§Errors
Returns ServerError when no reply arrives in time or the conversation
is unavailable.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectionConversation
impl !Sync for ConnectionConversation
impl !UnwindSafe for ConnectionConversation
impl Freeze for ConnectionConversation
impl Send for ConnectionConversation
impl Unpin for ConnectionConversation
impl UnsafeUnpin for ConnectionConversation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more