pub enum MessageKind {
Message {
body: String,
blocks: Option<Vec<ContentBlock>>,
content_taint: Option<SenderContentTaint>,
handling_mode: Option<HandlingMode>,
},
Request {
intent: String,
params: Value,
blocks: Option<Vec<ContentBlock>>,
content_taint: Option<SenderContentTaint>,
handling_mode: Option<HandlingMode>,
},
Lifecycle {
kind: PeerLifecycleKind,
params: Value,
},
Response {
in_reply_to: Uuid,
status: Status,
result: Value,
blocks: Option<Vec<ContentBlock>>,
content_taint: Option<SenderContentTaint>,
handling_mode: Option<HandlingMode>,
},
Ack {
in_reply_to: Uuid,
},
}Expand description
The kind of message being sent.
Variants§
Message
A simple text message.
Fields
blocks: Option<Vec<ContentBlock>>Optional multimodal content blocks. When present, carries full
multimodal content; body remains the canonical text projection.
content_taint: Option<SenderContentTaint>Sender-declared content taint. Lives INSIDE the signed region
(kind is part of the signable tuple): omitted-when-None keeps
old envelopes byte-identical and verifying; present-when-Some is
covered by the signature. None = no declaration — a real third
state receivers must never coalesce into
SenderContentTaint::Clean.
handling_mode: Option<HandlingMode>Request
A request for the peer to perform an action.
Fields
blocks: Option<Vec<ContentBlock>>content_taint: Option<SenderContentTaint>Sender-declared content taint (signed-when-present; see
MessageKind::Message::content_taint).
handling_mode: Option<HandlingMode>Lifecycle
A one-way peer lifecycle notification.
Response
A response to a previous request.
Fields
blocks: Option<Vec<ContentBlock>>content_taint: Option<SenderContentTaint>Sender-declared content taint (signed-when-present; see
MessageKind::Message::content_taint).
handling_mode: Option<HandlingMode>Ack
Acknowledgment of message receipt.
Implementations§
Source§impl MessageKind
impl MessageKind
Sourcepub fn content_taint(&self) -> Option<SenderContentTaint>
pub fn content_taint(&self) -> Option<SenderContentTaint>
Sender-declared content taint carried by this kind, when it is a
content-bearing kind (Message / Request / Response) and a
declaration is present.
Trait Implementations§
Source§impl Clone for MessageKind
impl Clone for MessageKind
Source§fn clone(&self) -> MessageKind
fn clone(&self) -> MessageKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MessageKind
impl Debug for MessageKind
Source§impl<'de> Deserialize<'de> for MessageKind
impl<'de> Deserialize<'de> for MessageKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MessageKind
impl PartialEq for MessageKind
Source§fn eq(&self, other: &MessageKind) -> bool
fn eq(&self, other: &MessageKind) -> bool
self and other values to be equal, and is used by ==.