RetrievePushMap

Trait RetrievePushMap 

Source
pub trait RetrievePushMap {
    // Required methods
    fn retrieve_attempt(&self) -> Option<u32>;
    fn retrieve_delivery_mode(&self) -> Option<DeliveryMode>;
    fn retrieve_priority(&self) -> Option<u8>;
    fn retrieve_timestamp(&self) -> Option<u64>;
    fn push_attempt(self, attempt: u32) -> Self;
    fn increment_attempt(self) -> Self;
    fn push_delivery_mode(self, delivery_mode: DeliveryMode) -> Self;
    fn push_priority(self, priority: u8) -> Self;
    fn push_timestamp(self, timestamp: u64) -> Self;
    fn push_current_timestamp(self) -> Self;
}
Expand description

Convenience layer around AMQPProperties that allows easier getting and setting of the common properties.

Required Methods§

Source

fn retrieve_attempt(&self) -> Option<u32>

Extracts the attempt number from these AMQPProperties, if it is present and can be coerced to a u32.

The attempt number is not a recognized AMQP property, and is stored in the headers under the key HEADER_ATTEMPT.

Source

fn retrieve_delivery_mode(&self) -> Option<DeliveryMode>

Extracts the DeliveryMode from these AMQPProperties, if it is present.

Source

fn retrieve_priority(&self) -> Option<u8>

Extracts the priority from these AMQPProperties, if it is present and can be coerced to a u8.

Source

fn retrieve_timestamp(&self) -> Option<u64>

Extracts the timestamp from these AMQPProperties, if it is present and can be coerced to a u64 (a UNIX timestamp).

Source

fn push_attempt(self, attempt: u32) -> Self

Sets the attempt number in these AMQPProperties to the given value.

The attempt number is not a recognized AMQP property, and is stored in the headers under the key HEADER_ATTEMPT.

Source

fn increment_attempt(self) -> Self

Increments the attempt number in these AMQPProperties by one. If no value exists, sets the new value to one.

The attempt number is not a recognized AMQP property, and is stored in the headers under the key HEADER_ATTEMPT.

Source

fn push_delivery_mode(self, delivery_mode: DeliveryMode) -> Self

Sets the DeliveryMode in these AMQPProperties to the given value.

Source

fn push_priority(self, priority: u8) -> Self

Sets the priority in these AMQPProperties to the given u8 value.

Source

fn push_timestamp(self, timestamp: u64) -> Self

Sets the timestamp in these AMQPProperties to the given u64 value (UNIX timestamp).

Source

fn push_current_timestamp(self) -> Self

Sets the message ID in these AMQPProperties to the current timestamp as reported by SystemTime and converted to a u64 value (UNIX timestamp).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RetrievePushMap for AMQPProperties

Source§

fn retrieve_attempt(&self) -> Option<u32>

Source§

fn retrieve_delivery_mode(&self) -> Option<DeliveryMode>

Source§

fn retrieve_priority(&self) -> Option<u8>

Source§

fn retrieve_timestamp(&self) -> Option<u64>

Source§

fn push_attempt(self, attempt: u32) -> Self

Source§

fn increment_attempt(self) -> Self

Source§

fn push_delivery_mode(self, delivery_mode: DeliveryMode) -> Self

Source§

fn push_priority(self, priority: u8) -> Self

Source§

fn push_timestamp(self, timestamp: u64) -> Self

Source§

fn push_current_timestamp(self) -> Self

Implementors§