pub struct MessageMetadata {
pub timestamp: u64,
pub timeout_ms: Option<u32>,
pub compression: CompressionType,
pub stream_id: Option<u64>,
pub sequence_number: Option<u64>,
}Expand description
Optional metadata for messages
Fields§
§timestamp: u64Timestamp when message was created (microseconds since epoch)
timeout_ms: Option<u32>Timeout in milliseconds
compression: CompressionTypeCompression algorithm used
stream_id: Option<u64>Stream ID for streaming messages
sequence_number: Option<u64>Sequence number for ordered delivery
Implementations§
Source§impl MessageMetadata
impl MessageMetadata
pub fn new() -> Self
pub fn with_timeout(self, timeout_ms: u32) -> Self
pub fn with_compression(self, compression: CompressionType) -> Self
Sourcepub fn with_stream(self, stream_id: u64, sequence: u64) -> Self
pub fn with_stream(self, stream_id: u64, sequence: u64) -> Self
Set stream ID
Trait Implementations§
Source§impl Clone for MessageMetadata
impl Clone for MessageMetadata
Source§impl Debug for MessageMetadata
impl Debug for MessageMetadata
Source§impl Default for MessageMetadata
impl Default for MessageMetadata
Source§impl<'de> Deserialize<'de> for MessageMetadata
impl<'de> Deserialize<'de> for MessageMetadata
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 MessageMetadata
impl RefUnwindSafe for MessageMetadata
impl Send for MessageMetadata
impl Sync for MessageMetadata
impl Unpin for MessageMetadata
impl UnsafeUnpin for MessageMetadata
impl UnwindSafe for MessageMetadata
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