Struct lapin_futures::channel::Channel [] [src]

pub struct Channel<T> {
    pub transport: Arc<Mutex<AMQPTransport<T>>>,
    pub id: u16,
}

Channel provides methods to act on a channel, such as managing queues

Fields

Methods

impl<T: AsyncRead + AsyncWrite + Send + 'static> Channel<T>
[src]

[src]

create a channel

[src]

request access

returns a future that resolves once the access is granted

[src]

declares an exchange

returns a future that resolves once the exchange is available

[src]

deletes an exchange

returns a future that resolves once the exchange is deleted

[src]

binds an exchange to another exchange

returns a future that resolves once the exchanges are bound

[src]

unbinds an exchange from another one

returns a future that resolves once the exchanges are unbound

[src]

declares a queue

returns a future that resolves once the queue is available

the mandatory and ìmmediate options can be set to true, but the return message will not be handled

[src]

binds a queue to an exchange

returns a future that resolves once the queue is bound to the exchange

[src]

unbinds a queue from the exchange

returns a future that resolves once the queue is unbound from the exchange

[src]

sets up confirm extension for this channel

[src]

specifies quality of service for a channel

[src]

publishes a message on a queue

the future's result is:

  • Some(true) if we're on a confirm channel and the message was ack'd
  • Some(false) if we're on a confirm channel and the message was nack'd
  • None if we're not on a confirm channel

[src]

creates a consumer stream

returns a future of a Consumer that resolves once the method succeeds

Consumer implements futures::Stream, so it can be used with any of the usual combinators

[src]

acks a message

[src]

nacks a message

[src]

rejects a message

[src]

gets a message

[src]

Purge a queue.

This method removes all messages from a queue which are not awaiting acknowledgment.

[src]

Delete a queue.

This method deletes a queue. When a queue is deleted any pending messages are sent to a dead-letter queue if this is defined in the server configuration, and all consumers on the queue are cancelled.

If if_unused is set, the server will only delete the queue if it has no consumers. If the queue has consumers the server does not delete it but raises a channel exception instead.

If if_empty is set, the server will only delete the queue if it has no messages.

[src]

closes the cannel

[src]

internal method to wait until a request succeeds

Trait Implementations

impl<T> Clone for Channel<T> where
    T: Send
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Channel<T> where
    T: Send

impl<T> Sync for Channel<T> where
    T: Send