pub struct ProtocolMessage {
pub id: Option<String>,
pub topic: String,
pub payload: Vec<u8>,
pub metadata: HashMap<String, String>,
pub qos: Option<u8>,
pub timestamp: Option<DateTime<Utc>>,
}
Expand description
A message in a streaming protocol
Fields§
§id: Option<String>
Message ID or sequence number
topic: String
Topic or channel name
payload: Vec<u8>
Message payload
metadata: HashMap<String, String>
Message metadata (headers, properties, etc.)
qos: Option<u8>
Quality of Service level
timestamp: Option<DateTime<Utc>>
Timestamp when message was received
Trait Implementations§
Source§impl Clone for ProtocolMessage
impl Clone for ProtocolMessage
Source§fn clone(&self) -> ProtocolMessage
fn clone(&self) -> ProtocolMessage
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 moreAuto Trait Implementations§
impl Freeze for ProtocolMessage
impl RefUnwindSafe for ProtocolMessage
impl Send for ProtocolMessage
impl Sync for ProtocolMessage
impl Unpin for ProtocolMessage
impl UnwindSafe for ProtocolMessage
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