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§
Sourcefn retrieve_attempt(&self) -> Option<u32>
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.
Sourcefn retrieve_delivery_mode(&self) -> Option<DeliveryMode>
fn retrieve_delivery_mode(&self) -> Option<DeliveryMode>
Extracts the DeliveryMode from these AMQPProperties, if it is
present.
Sourcefn retrieve_priority(&self) -> Option<u8>
fn retrieve_priority(&self) -> Option<u8>
Extracts the priority from these AMQPProperties, if it is present
and can be coerced to a u8.
Sourcefn retrieve_timestamp(&self) -> Option<u64>
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).
Sourcefn push_attempt(self, attempt: u32) -> Self
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.
Sourcefn increment_attempt(self) -> Self
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.
Sourcefn push_delivery_mode(self, delivery_mode: DeliveryMode) -> Self
fn push_delivery_mode(self, delivery_mode: DeliveryMode) -> Self
Sets the DeliveryMode in these AMQPProperties to the given value.
Sourcefn push_priority(self, priority: u8) -> Self
fn push_priority(self, priority: u8) -> Self
Sets the priority in these AMQPProperties to the given u8 value.
Sourcefn push_timestamp(self, timestamp: u64) -> Self
fn push_timestamp(self, timestamp: u64) -> Self
Sets the timestamp in these AMQPProperties to the given u64 value
(UNIX timestamp).
Sourcefn push_current_timestamp(self) -> Self
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.