[][src]Struct amiquip::Delivery

pub struct Delivery {
    pub redelivered: bool,
    pub exchange: String,
    pub routing_key: String,
    pub body: Vec<u8>,
    pub properties: AmqpProperties,
    // some fields omitted
}

A message delivered to a consumer.

Fields

redelivered: bool

If true, this message has previously been delivered to this or another consumer.

exchange: String

The name of the exchange this message was originally published to. May be an empty string (the default exhange).

routing_key: String

The routing key specified when this message was published.

body: Vec<u8>

The content body containing the message.

properties: AmqpProperties

Properties associated with the message.

Implementations

impl Delivery[src]

pub fn delivery_tag(&self) -> u64[src]

The server-assigned delivery tag for this message. Delivery tags are channel-specific.

pub fn ack(self, channel: &Channel) -> Result<()>[src]

Acknowledge this delivery, which must have been received on the given channel. If multiple is true, acks this delivery and all other deliveries received on this channel with smaller delivery_tags.

Panics

This method will attempt to panic if channel does not match the channel this delivery was received on. It does this by comparing channel IDs, so it is possible that an incorrect Delivery/Channel pairing will not be detected at runtime. Always ack deliveries with the channel they were received on; the result of failing to do this is unspecified by the AMQP specification.

pub fn ack_multiple(self, channel: &Channel) -> Result<()>[src]

Acknowledge this delivery, which must have been received on the given channel, and all other deliveries received on this channel with smaller delivery_tags.

Panics

This method will attempt to panic if channel does not match the channel this delivery was received on. It does this by comparing channel IDs, so it is possible that an incorrect Delivery/Channel pairing will not be detected at runtime. Always ack deliveries with the channel they were received on; the result of failing to do this is unspecified by the AMQP specification.

pub fn nack(self, channel: &Channel, requeue: bool) -> Result<()>[src]

Reject this delivery, which must have been received on the given channel. If requeue is true, instructs the server to attempt to requeue the message.

Panics

This method will attempt to panic if channel does not match the channel this delivery was received on. It does this by comparing channel IDs, so it is possible that an incorrect Delivery/Channel pairing will not be detected at runtime. Always ack deliveries with the channel they were received on; the result of failing to do this is unspecified by the AMQP specification.

pub fn nack_multiple(self, channel: &Channel, requeue: bool) -> Result<()>[src]

Reject this delivery, which must have been received on the given channel, and all other unacknowledged deliveries to this channel with smaller delivery_tags. If requeue is true, instructs the server to attempt to requeue the message.

Panics

This method will attempt to panic if channel does not match the channel this delivery was received on. It does this by comparing channel IDs, so it is possible that an incorrect Delivery/Channel pairing will not be detected at runtime. Always ack deliveries with the channel they were received on; the result of failing to do this is unspecified by the AMQP specification.

pub fn reject(self, channel: &Channel, requeue: bool) -> Result<()>[src]

Reject this delivery, which must have been received on the given channel. If requeue is true, instructs the server to attempt to requeue the message.

Panics

This method will attempt to panic if channel does not match the channel this delivery was received on. It does this by comparing channel IDs, so it is possible that an incorrect Delivery/Channel pairing will not be detected at runtime. Always ack deliveries with the channel they were received on; the result of failing to do this is unspecified by the AMQP specification.

Trait Implementations

impl Clone for Delivery[src]

impl Debug for Delivery[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.