pub struct UnloadableConversationRecord { /* private fields */ }Expand description
The write side: the record a participant handler maintains.
Cloning shares the one record (an Arc), which is exactly what lets the
handler keep writing while the health endpoint reads.
Implementations§
Source§impl UnloadableConversationRecord
impl UnloadableConversationRecord
Sourcepub fn record(&self, entry: UnloadableConversation) -> bool
pub fn record(&self, entry: UnloadableConversation) -> bool
Retains one refusal, replacing any earlier refusal of the same conversation.
Answers false when the record’s lock is poisoned and the refusal was
therefore NOT retained. The caller must report that: a refusal that was
reported but not retained is a weaker state than a retained one, and an
operator reading this surface must not be told a shorter story than the
log tells.
Sourcepub fn retire(&self, conversation_id: ConversationId) -> bool
pub fn retire(&self, conversation_id: ConversationId) -> bool
Retires a conversation’s refusal once it has actually loaded, so the surface never keeps reporting a conversation that recovered.
Answers false when the lock is poisoned and the retirement therefore
did not happen.
Sourcepub fn snapshot(&self) -> Vec<UnloadableConversation>
pub fn snapshot(&self) -> Vec<UnloadableConversation>
Every refusal currently retained, in conversation-id order.
A poisoned lock is read THROUGH (PoisonError::into_inner) rather
than answered with an empty set: the retained refusals are still the
node’s true answer, and reporting “nothing is refused” because a
mutex was poisoned would be the surface’s own false green. The write
side deliberately does not do this — a refusal it could not retain is
reported as not retained.
Trait Implementations§
Source§impl Clone for UnloadableConversationRecord
impl Clone for UnloadableConversationRecord
Source§fn clone(&self) -> UnloadableConversationRecord
fn clone(&self) -> UnloadableConversationRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more