#[non_exhaustive]pub enum MessagePayload {
Text {
content: String,
},
Structured {
data: Value,
},
Binary {
mime_type: String,
data: Vec<u8>,
},
}Expand description
Message payload types for channel communication.
Supports text, structured data, and binary payloads. The Binary
variant is reserved for voice/audio data (Workstream G).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Plain text message.
Structured
Structured data (JSON object).
Binary
Binary data with MIME type (e.g., audio/wav for voice).
Implementations§
Trait Implementations§
Source§impl Clone for MessagePayload
impl Clone for MessagePayload
Source§fn clone(&self) -> MessagePayload
fn clone(&self) -> MessagePayload
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 MessagePayload
impl Debug for MessagePayload
Source§impl<'de> Deserialize<'de> for MessagePayload
impl<'de> Deserialize<'de> for MessagePayload
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MessagePayload
impl RefUnwindSafe for MessagePayload
impl Send for MessagePayload
impl Sync for MessagePayload
impl Unpin for MessagePayload
impl UnsafeUnpin for MessagePayload
impl UnwindSafe for MessagePayload
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