[][src]Struct amiquip::Exchange

pub struct Exchange<'a> { /* fields omitted */ }

Handle for a declared AMQP exchange.

Implementations

impl<'_> Exchange<'_>[src]

pub fn direct(channel: &Channel) -> Exchange<'_>[src]

Construct a handle for the direct exchange on the given channel. This is an entirely local operation; the default exchange (named "") is guaranteed to exist and does not need to be declared.

pub fn name(&self) -> &str[src]

Name of this exchange.

pub fn publish(&self, publish: Publish<'_>) -> Result<()>[src]

Publish a message to this exchange.

pub fn bind_to_source<S: Into<String>>(
    &self,
    source: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Synchronously bind this exchange (as destination) to the source exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn bind_to_source_nowait<S: Into<String>>(
    &self,
    source: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Asynchronously bind this exchange (as destination) to the source exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn bind_to_destination<S: Into<String>>(
    &self,
    destination: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Synchronously bind this exchange (as source) to the destination exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn bind_to_destination_nowait<S: Into<String>>(
    &self,
    destination: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Asynchronously bind this exchange (as source) to the destination exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn unbind_from_source<S: Into<String>>(
    &self,
    source: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Synchronously unbind this exchange (as destination) from the source exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn unbind_from_source_nowait<S: Into<String>>(
    &self,
    source: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Asynchronously unbind this exchange (as destination) from the source exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn unbind_from_destination<S: Into<String>>(
    &self,
    destination: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Synchronously unbind this exchange (as source) from the destination exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn unbind_from_destination_nowait<S: Into<String>>(
    &self,
    destination: &Exchange<'_>,
    routing_key: S,
    arguments: FieldTable
) -> Result<()>
[src]

Asynchronously unbind this exchange (as source) from the destination exchange with the given routing key and arguments. Exchange-to-exchange binding is a RabbitMQ extension; you can examine the connection's server properties to see if the current connection supports this feature.

pub fn delete(self, if_unused: bool) -> Result<()>[src]

Synchronously delete this exchange. If if_unused is true, the exchange will only be deleted if it has no queue bindings; if if_unused is true and the exchange still has queue bindings, the server will close this channel.

pub fn delete_nowait(self, if_unused: bool) -> Result<()>[src]

Asynchronously delete this exchange. If if_unused is true, the exchange will only be deleted if it has no queue bindings; if if_unused is true and the exchange still has queue bindings, the server will close this channel.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Exchange<'a>

impl<'a> !Send for Exchange<'a>

impl<'a> !Sync for Exchange<'a>

impl<'a> Unpin for Exchange<'a>

impl<'a> !UnwindSafe for Exchange<'a>

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, 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.