pub struct Delivery {
pub delivery_tag: DeliveryTag,
pub exchange: ShortString,
pub routing_key: ShortString,
pub redelivered: bool,
pub properties: BasicProperties,
pub data: Vec<u8>,
pub acker: Acker,
}
Expand description
A received AMQP message.
The message has to be acknowledged after processing by calling
Acker::ack
, Acker::nack
or Acker::reject
.
(Multiple acknowledgments are also possible).
Fields§
§delivery_tag: DeliveryTag
The delivery tag of the message. Use this for acknowledging the message.
exchange: ShortString
The exchange of the message. May be an empty string if the default exchange is used.
routing_key: ShortString
The routing key of the message. May be an empty string if no routing key is specified.
redelivered: bool
Whether this message was redelivered
properties: BasicProperties
Contains the properties and the headers of the message.
data: Vec<u8>
The payload of the message in binary format.
acker: Acker
The acker used to ack/nack the message
Methods from Deref<Target = Acker>§
pub async fn ack(&self, options: BasicAckOptions) -> Result<()>
pub async fn nack(&self, options: BasicNackOptions) -> Result<()>
pub async fn reject(&self, options: BasicRejectOptions) -> Result<()>
pub fn used(&self) -> bool
Trait Implementations§
source§impl PartialEq for Delivery
impl PartialEq for Delivery
impl StructuralPartialEq for Delivery
Auto Trait Implementations§
impl Freeze for Delivery
impl !RefUnwindSafe for Delivery
impl Send for Delivery
impl Sync for Delivery
impl Unpin for Delivery
impl !UnwindSafe for Delivery
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