[][src]Struct lapin_futures::Channel

pub struct Channel { /* fields omitted */ }

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

Methods

impl Channel[src]

pub fn create(conn: &Connection) -> impl Future<Item = Self, Error = Error>[src]

create a channel

pub fn id(&self) -> u16[src]

pub fn access_request(
    &self,
    realm: &str,
    options: AccessRequestOptions
) -> ConfirmationFuture<()>
[src]

request access

returns a future that resolves once the access is granted

pub fn exchange_declare(
    &self,
    name: &str,
    exchange_type: &str,
    options: ExchangeDeclareOptions,
    arguments: FieldTable
) -> ConfirmationFuture<()>
[src]

declares an exchange

returns a future that resolves once the exchange is available

pub fn exchange_delete(
    &self,
    name: &str,
    options: ExchangeDeleteOptions
) -> ConfirmationFuture<()>
[src]

deletes an exchange

returns a future that resolves once the exchange is deleted

pub fn exchange_bind(
    &self,
    destination: &str,
    source: &str,
    routing_key: &str,
    options: ExchangeBindOptions,
    arguments: FieldTable
) -> ConfirmationFuture<()>
[src]

binds an exchange to another exchange

returns a future that resolves once the exchanges are bound

pub fn exchange_unbind(
    &self,
    destination: &str,
    source: &str,
    routing_key: &str,
    options: ExchangeUnbindOptions,
    arguments: FieldTable
) -> ConfirmationFuture<()>
[src]

unbinds an exchange from another one

returns a future that resolves once the exchanges are unbound

pub fn queue_declare(
    &self,
    name: &str,
    options: QueueDeclareOptions,
    arguments: FieldTable
) -> ConfirmationFuture<Queue>
[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

pub fn queue_bind(
    &self,
    name: &str,
    exchange: &str,
    routing_key: &str,
    options: QueueBindOptions,
    arguments: FieldTable
) -> ConfirmationFuture<()>
[src]

binds a queue to an exchange

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

pub fn queue_unbind(
    &self,
    name: &str,
    exchange: &str,
    routing_key: &str,
    arguments: FieldTable
) -> ConfirmationFuture<()>
[src]

unbinds a queue from the exchange

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

pub fn confirm_select(
    &self,
    options: ConfirmSelectOptions
) -> ConfirmationFuture<()>
[src]

sets up confirm extension for this channel

pub fn basic_qos(
    &self,
    prefetch_count: ShortUInt,
    options: BasicQosOptions
) -> ConfirmationFuture<()>
[src]

specifies quality of service for a channel

pub fn basic_publish(
    &self,
    exchange: &str,
    routing_key: &str,
    payload: Vec<u8>,
    options: BasicPublishOptions,
    properties: BasicProperties
) -> ConfirmationFuture<()>
[src]

publishes a message on a queue

pub fn basic_consume(
    &self,
    queue: &Queue,
    consumer_tag: &str,
    options: BasicConsumeOptions,
    arguments: FieldTable
) -> impl Future<Item = Consumer, Error = Error>
[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

pub fn basic_cancel(
    &self,
    consumer_tag: &str,
    options: BasicCancelOptions
) -> ConfirmationFuture<()>
[src]

pub fn basic_recover(
    &self,
    options: BasicRecoverOptions
) -> ConfirmationFuture<()>
[src]

pub fn basic_recover_async(
    &self,
    options: BasicRecoverAsyncOptions
) -> ConfirmationFuture<()>
[src]

pub fn basic_ack(
    &self,
    delivery_tag: u64,
    multiple: bool
) -> ConfirmationFuture<()>
[src]

acks a message

pub fn basic_nack(
    &self,
    delivery_tag: u64,
    multiple: bool,
    requeue: bool
) -> ConfirmationFuture<()>
[src]

nacks a message

pub fn basic_reject(
    &self,
    delivery_tag: u64,
    options: BasicRejectOptions
) -> ConfirmationFuture<()>
[src]

rejects a message

pub fn basic_get(
    &self,
    queue: &str,
    options: BasicGetOptions
) -> ConfirmationFuture<Option<BasicGetMessage>>
[src]

gets a message

pub fn queue_purge(
    &self,
    queue_name: &str,
    options: QueuePurgeOptions
) -> ConfirmationFuture<LongUInt>
[src]

Purge a queue.

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

pub fn queue_delete(
    &self,
    queue_name: &str,
    options: QueueDeleteOptions
) -> ConfirmationFuture<LongUInt>
[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.

pub fn close(&self, code: u16, message: &str) -> ConfirmationFuture<()>[src]

closes the channel

pub fn channel_flow(
    &self,
    options: ChannelFlowOptions
) -> ConfirmationFuture<Boolean>
[src]

update a channel flow

pub fn tx_select(&self) -> ConfirmationFuture<()>[src]

pub fn tx_commit(&self) -> ConfirmationFuture<()>[src]

pub fn tx_rollback(&self) -> ConfirmationFuture<()>[src]

pub fn wait_for_confirms(&self) -> ConfirmationFuture<Vec<BasicReturnMessage>>[src]

When publishers confirm is enabled, wait for pending confirmations and return the nacked messages

Trait Implementations

impl Clone for Channel[src]

Auto Trait Implementations

impl Unpin for Channel

impl Sync for Channel

impl Send for Channel

impl !UnwindSafe for Channel

impl !RefUnwindSafe for Channel

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]