pub struct BridgeMessage {
pub id: String,
pub content: String,
pub source: Option<String>,
pub metadata: Option<HashMap<String, String>>,
}Expand description
A message exchanged between Brain and the remote gateway.
Fields§
§id: StringUnique message ID (UUID v4 string).
content: StringText content of the message.
source: Option<String>Optional source label set by the gateway (transport id, channel name, sender id — whatever the gateway forwards).
metadata: Option<HashMap<String, String>>Arbitrary key-value metadata forwarded from the gateway.
Implementations§
Trait Implementations§
Source§impl Clone for BridgeMessage
impl Clone for BridgeMessage
Source§fn clone(&self) -> BridgeMessage
fn clone(&self) -> BridgeMessage
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 BridgeMessage
impl Debug for BridgeMessage
Source§impl<'de> Deserialize<'de> for BridgeMessage
impl<'de> Deserialize<'de> for BridgeMessage
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
Source§impl PartialEq for BridgeMessage
impl PartialEq for BridgeMessage
Source§fn eq(&self, other: &BridgeMessage) -> bool
fn eq(&self, other: &BridgeMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BridgeMessage
impl Serialize for BridgeMessage
impl StructuralPartialEq for BridgeMessage
Auto Trait Implementations§
impl Freeze for BridgeMessage
impl RefUnwindSafe for BridgeMessage
impl Send for BridgeMessage
impl Sync for BridgeMessage
impl Unpin for BridgeMessage
impl UnsafeUnpin for BridgeMessage
impl UnwindSafe for BridgeMessage
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