pub struct Queue { /* private fields */ }Expand description
Defines of a RabbitMQ queue to be declared from the consuming side.
Implementations§
Source§impl Queue
impl Queue
Sourcepub fn named(name: impl AsRef<str>) -> Self
pub fn named(name: impl AsRef<str>) -> Self
Creates a queue definition with the given name, falling on defaults for all other configuration.
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates a queue definition without a given name (which will cause RabbitMQ to generate one), falling on defaults for all other configuration.
Sourcepub fn with_kind(self, kind: QueueKind) -> Self
pub fn with_kind(self, kind: QueueKind) -> Self
Re-creates this queue definition with the given kind.
Sourcepub fn with_rename(self, rename: QueueRenamingBehavior) -> Self
pub fn with_rename(self, rename: QueueRenamingBehavior) -> Self
Re-creates this queue definition with the given renaming behavior.
Source§impl Queue
impl Queue
Sourcepub fn name(&self) -> Cow<'_, str>
pub fn name(&self) -> Cow<'_, str>
Reports the queue name for this definition, taking into account the renaming behavior.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Reports whether the queue name for this definition is empty.
An empty name is a signal to RabbitMQ to generate a random queue name, which may or may not be acceptable. For example, it is not possible to define a queue with an empty name for the built-in default exchange.
Sourcepub fn rename(&self) -> QueueRenamingBehavior
pub fn rename(&self) -> QueueRenamingBehavior
Reports the queue renaming behavior for this definition.