pub struct QueueMessage {
pub topic: String,
pub payload: Bytes,
pub headers: BTreeMap<String, String>,
pub key: Option<String>,
pub partition: Option<i32>,
pub dead_letter: Option<DeadLetterTarget>,
pub attributes: Value,
}Fields§
§topic: String§payload: Bytes§headers: BTreeMap<String, String>§key: Option<String>§partition: Option<i32>§dead_letter: Option<DeadLetterTarget>§attributes: ValueImplementations§
Source§impl QueueMessage
impl QueueMessage
pub fn new(topic: impl Into<String>, payload: impl Into<Bytes>) -> Self
pub fn with_key(self, key: impl Into<String>) -> Self
pub fn with_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_partition(self, partition: i32) -> Self
pub fn with_dead_letter(self, target: DeadLetterTarget) -> Self
pub fn with_attributes(self, attributes: Value) -> Self
Trait Implementations§
Source§impl Clone for QueueMessage
impl Clone for QueueMessage
Source§fn clone(&self) -> QueueMessage
fn clone(&self) -> QueueMessage
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 moreAuto Trait Implementations§
impl !Freeze for QueueMessage
impl RefUnwindSafe for QueueMessage
impl Send for QueueMessage
impl Sync for QueueMessage
impl Unpin for QueueMessage
impl UnsafeUnpin for QueueMessage
impl UnwindSafe for QueueMessage
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