pub struct DialogueTracker {
pub last_out: Option<Performative>,
/* private fields */
}Expand description
§16 enforcement: tracks the last performative this side SENT and validates each incoming reply against the matrix. Off-policy replies are reported (receivers SHOULD reject them; strict enforcement is a session policy choice).
Fields§
§last_out: Option<Performative>last performative this side sent (the one awaiting a reply)
Implementations§
Source§impl DialogueTracker
impl DialogueTracker
pub fn new() -> Self
Sourcepub fn on_send(&mut self, p: Performative)
pub fn on_send(&mut self, p: Performative)
record an outgoing performative (it now awaits a legal reply)
Sourcepub fn on_receive(
&self,
reply: Performative,
) -> Result<bool, (Performative, Performative)>
pub fn on_receive( &self, reply: Performative, ) -> Result<bool, (Performative, Performative)>
validate an incoming reply against what we last sent.
Ok(true) = legal reply, Ok(false) = no expectation open
(peer opened a new conversation — legal), Err = off-policy.
Trait Implementations§
Source§impl Clone for DialogueTracker
impl Clone for DialogueTracker
Source§fn clone(&self) -> DialogueTracker
fn clone(&self) -> DialogueTracker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DialogueTracker
impl Debug for DialogueTracker
Source§impl Default for DialogueTracker
impl Default for DialogueTracker
Source§fn default() -> DialogueTracker
fn default() -> DialogueTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DialogueTracker
impl RefUnwindSafe for DialogueTracker
impl Send for DialogueTracker
impl Sync for DialogueTracker
impl Unpin for DialogueTracker
impl UnsafeUnpin for DialogueTracker
impl UnwindSafe for DialogueTracker
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