pub enum CommsCommand {
Input {
session_id: SessionId,
body: String,
blocks: Option<Vec<ContentBlock>>,
handling_mode: HandlingMode,
source: InputSource,
allow_self_session: bool,
},
PeerMessage {
to: PeerName,
body: String,
blocks: Option<Vec<ContentBlock>>,
handling_mode: HandlingMode,
},
PeerRequest {
to: PeerName,
intent: String,
params: Value,
handling_mode: HandlingMode,
},
PeerResponse {
to: PeerName,
in_reply_to: InteractionId,
status: ResponseStatus,
result: Value,
handling_mode: Option<HandlingMode>,
},
}Expand description
Transport-independent comms command envelope.
Variants§
Input
Inject input into the local session.
PeerMessage
Send a one-way peer message.
PeerRequest
Send a request to a peer.
PeerResponse
Send a response to a prior peer request.
Implementations§
Source§impl CommsCommand
impl CommsCommand
pub fn command_kind(&self) -> &'static str
Trait Implementations§
Source§impl Clone for CommsCommand
impl Clone for CommsCommand
Source§fn clone(&self) -> CommsCommand
fn clone(&self) -> CommsCommand
Returns a duplicate of the value. Read more
1.0.0 · 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 CommsCommand
impl Debug for CommsCommand
Source§impl PartialEq for CommsCommand
impl PartialEq for CommsCommand
impl Eq for CommsCommand
impl StructuralPartialEq for CommsCommand
Auto Trait Implementations§
impl Freeze for CommsCommand
impl RefUnwindSafe for CommsCommand
impl Send for CommsCommand
impl Sync for CommsCommand
impl Unpin for CommsCommand
impl UnsafeUnpin for CommsCommand
impl UnwindSafe for CommsCommand
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.