[][src]Struct amiquip::QueueDeclareOptions

pub struct QueueDeclareOptions {
    pub durable: bool,
    pub exclusive: bool,
    pub auto_delete: bool,
    pub arguments: FieldTable,
}

Options passed to the server when declaring a queue.

The default implementation sets all boolean fields to false and has an empty set of arguments.

Example

The arguments field can be used to declare a quorum queue:

let mut arguments = FieldTable::new();
arguments.insert(
    "x-queue-type".to_string(),
    AmqpValue::LongString("quorum".to_string()),
);
let options = QueueDeclareOptions {
    arguments,
    ..QueueDeclareOptions::default()
};

Fields

durable: bool

If true, declares queue as durable (survives server restarts); if false, declares queue as transient (will be deleted on a server restart).

exclusive: bool

If true, declares queue as exclusive: the queue may only be accessed by the current connection, and it will be deleted when the current connection is closed.

auto_delete: bool

If true, declares queue as auto-delete: the server will delete it once the last consumer is disconnected (either by cancellation or by its channel being closed).

NOTE: If a queue is declared as auto-delete but never has a consumer, it will not be deleted.

arguments: FieldTable

Extra arguments; these are optional in general, but may be needed for some plugins or server-specific features.

Trait Implementations

impl Clone for QueueDeclareOptions[src]

impl Debug for QueueDeclareOptions[src]

impl Default for QueueDeclareOptions[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.