[−][src]Struct lapin_futures::Channel
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]
&self,
realm: &str,
options: AccessRequestOptions
) -> ConfirmationFuture<()>
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]
&self,
name: &str,
exchange_type: &str,
options: ExchangeDeclareOptions,
arguments: FieldTable
) -> ConfirmationFuture<()>
declares an exchange
returns a future that resolves once the exchange is available
pub fn exchange_delete(
&self,
name: &str,
options: ExchangeDeleteOptions
) -> ConfirmationFuture<()>
[src]
&self,
name: &str,
options: ExchangeDeleteOptions
) -> ConfirmationFuture<()>
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]
&self,
destination: &str,
source: &str,
routing_key: &str,
options: ExchangeBindOptions,
arguments: FieldTable
) -> ConfirmationFuture<()>
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]
&self,
destination: &str,
source: &str,
routing_key: &str,
options: ExchangeUnbindOptions,
arguments: FieldTable
) -> ConfirmationFuture<()>
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]
&self,
name: &str,
options: QueueDeclareOptions,
arguments: FieldTable
) -> ConfirmationFuture<Queue>
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]
&self,
name: &str,
exchange: &str,
routing_key: &str,
options: QueueBindOptions,
arguments: FieldTable
) -> ConfirmationFuture<()>
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]
&self,
name: &str,
exchange: &str,
routing_key: &str,
arguments: FieldTable
) -> ConfirmationFuture<()>
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]
&self,
options: ConfirmSelectOptions
) -> ConfirmationFuture<()>
sets up confirm extension for this channel
pub fn basic_qos(
&self,
prefetch_count: ShortUInt,
options: BasicQosOptions
) -> ConfirmationFuture<()>
[src]
&self,
prefetch_count: ShortUInt,
options: BasicQosOptions
) -> ConfirmationFuture<()>
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]
&self,
exchange: &str,
routing_key: &str,
payload: Vec<u8>,
options: BasicPublishOptions,
properties: BasicProperties
) -> ConfirmationFuture<()>
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'dSome(false)
if we're on a confirm channel and the message was nack'dNone
if we're not on a confirm channel
pub fn basic_consume(
&self,
queue: &Queue,
consumer_tag: &str,
options: BasicConsumeOptions,
arguments: FieldTable
) -> impl Future<Item = Consumer, Error = Error>
[src]
&self,
queue: &Queue,
consumer_tag: &str,
options: BasicConsumeOptions,
arguments: FieldTable
) -> impl Future<Item = Consumer, Error = Error>
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]
&self,
consumer_tag: &str,
options: BasicCancelOptions
) -> ConfirmationFuture<()>
pub fn basic_recover(
&self,
options: BasicRecoverOptions
) -> ConfirmationFuture<()>
[src]
&self,
options: BasicRecoverOptions
) -> ConfirmationFuture<()>
pub fn basic_recover_async(
&self,
options: BasicRecoverAsyncOptions
) -> ConfirmationFuture<()>
[src]
&self,
options: BasicRecoverAsyncOptions
) -> ConfirmationFuture<()>
pub fn basic_ack(
&self,
delivery_tag: u64,
multiple: bool
) -> ConfirmationFuture<()>
[src]
&self,
delivery_tag: u64,
multiple: bool
) -> ConfirmationFuture<()>
acks a message
pub fn basic_nack(
&self,
delivery_tag: u64,
multiple: bool,
requeue: bool
) -> ConfirmationFuture<()>
[src]
&self,
delivery_tag: u64,
multiple: bool,
requeue: bool
) -> ConfirmationFuture<()>
nacks a message
pub fn basic_reject(
&self,
delivery_tag: u64,
options: BasicRejectOptions
) -> ConfirmationFuture<()>
[src]
&self,
delivery_tag: u64,
options: BasicRejectOptions
) -> ConfirmationFuture<()>
rejects a message
pub fn basic_get(
&self,
queue: &str,
options: BasicGetOptions
) -> ConfirmationFuture<Option<BasicGetMessage>>
[src]
&self,
queue: &str,
options: BasicGetOptions
) -> ConfirmationFuture<Option<BasicGetMessage>>
gets a message
pub fn queue_purge(
&self,
queue_name: &str,
options: QueuePurgeOptions
) -> ConfirmationFuture<LongUInt>
[src]
&self,
queue_name: &str,
options: QueuePurgeOptions
) -> ConfirmationFuture<LongUInt>
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]
&self,
queue_name: &str,
options: QueueDeleteOptions
) -> ConfirmationFuture<LongUInt>
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]
&self,
options: ChannelFlowOptions
) -> ConfirmationFuture<Boolean>
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]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,