pub enum Dispatch {
Inline {
petname: String,
text: String,
task_id: Option<String>,
status: Option<TaskStatus>,
in_reply_to: Option<String>,
},
PairRequest {
from_key: String,
name: String,
},
PairAccept {
from_key: String,
name: String,
},
}Expand description
What to do with a verified, authorized message.
Variants§
Inline
Trusted peer: push the full content into the session now. Task-tracking
metadata (if any) rides along so the session can branch on it — e.g. a
NeedsInput is surfaced to the operator, a terminal status closes the loop.
Fields
§
status: Option<TaskStatus>PairRequest
A non-peer knocked: it wants to pair. Carries only its key and a self-claimed name — never actionable text. Surfaced for human accept/reject.
PairAccept
A non-peer replied that it accepted our earlier knock. The handler adds it only if we actually have an outstanding request to that key.
Trait Implementations§
impl Eq for Dispatch
impl StructuralPartialEq for Dispatch
Auto Trait Implementations§
impl Freeze for Dispatch
impl RefUnwindSafe for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnsafeUnpin for Dispatch
impl UnwindSafe for Dispatch
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.