Struct RabbitMqChannel

Source
pub struct RabbitMqChannel { /* private fields */ }
Expand description

lapin::Channel wrapper which maintains a ref counter to the channels underlying connection

Methods from Deref<Target = Channel>§

Source

pub fn status(&self) -> &ChannelStatus

Source

pub fn on_error<E>(&self, handler: E)
where E: FnMut(Error) + Send + 'static,

Source

pub fn id(&self) -> u16

Source

pub async fn close( &self, reply_code: u16, reply_text: &str, ) -> Result<(), Error>

Source

pub async fn basic_consume( &self, queue: &str, consumer_tag: &str, options: BasicConsumeOptions, arguments: FieldTable, ) -> Result<Consumer, Error>

Source

pub async fn basic_get( &self, queue: &str, options: BasicGetOptions, ) -> Result<Option<BasicGetMessage>, Error>

Source

pub async fn exchange_declare( &self, exchange: &str, kind: ExchangeKind, options: ExchangeDeclareOptions, arguments: FieldTable, ) -> Result<(), Error>

Source

pub async fn wait_for_confirms(&self) -> Result<Vec<BasicReturnMessage>, Error>

Source

pub async fn basic_qos( &self, prefetch_count: u16, options: BasicQosOptions, ) -> Result<(), Error>

Source

pub async fn basic_cancel( &self, consumer_tag: &str, options: BasicCancelOptions, ) -> Result<(), Error>

Source

pub async fn basic_publish( &self, exchange: &str, routing_key: &str, options: BasicPublishOptions, payload: &[u8], properties: AMQPProperties, ) -> Result<PublisherConfirm, Error>

Source

pub async fn basic_ack( &self, delivery_tag: u64, options: BasicAckOptions, ) -> Result<(), Error>

Source

pub async fn basic_reject( &self, delivery_tag: u64, options: BasicRejectOptions, ) -> Result<(), Error>

Source

pub async fn basic_recover_async( &self, options: BasicRecoverAsyncOptions, ) -> Result<(), Error>

Source

pub async fn basic_recover( &self, options: BasicRecoverOptions, ) -> Result<(), Error>

Source

pub async fn basic_nack( &self, delivery_tag: u64, options: BasicNackOptions, ) -> Result<(), Error>

Source

pub async fn channel_flow( &self, options: ChannelFlowOptions, ) -> Result<bool, Error>

Source

pub async fn access_request( &self, realm: &str, options: AccessRequestOptions, ) -> Result<(), Error>

Source

pub async fn exchange_delete( &self, exchange: &str, options: ExchangeDeleteOptions, ) -> Result<(), Error>

Delete an exchange

Source

pub async fn exchange_bind( &self, destination: &str, source: &str, routing_key: &str, options: ExchangeBindOptions, arguments: FieldTable, ) -> Result<(), Error>

Source

pub async fn exchange_unbind( &self, destination: &str, source: &str, routing_key: &str, options: ExchangeUnbindOptions, arguments: FieldTable, ) -> Result<(), Error>

Source

pub async fn queue_declare( &self, queue: &str, options: QueueDeclareOptions, arguments: FieldTable, ) -> Result<Queue, Error>

Source

pub async fn queue_bind( &self, queue: &str, exchange: &str, routing_key: &str, options: QueueBindOptions, arguments: FieldTable, ) -> Result<(), Error>

Source

pub async fn queue_purge( &self, queue: &str, options: QueuePurgeOptions, ) -> Result<u32, Error>

Source

pub async fn queue_delete( &self, queue: &str, options: QueueDeleteOptions, ) -> Result<u32, Error>

Source

pub async fn queue_unbind( &self, queue: &str, exchange: &str, routing_key: &str, arguments: FieldTable, ) -> Result<(), Error>

Source

pub async fn tx_select(&self) -> Result<(), Error>

Source

pub async fn tx_commit(&self) -> Result<(), Error>

Source

pub async fn tx_rollback(&self) -> Result<(), Error>

Source

pub async fn confirm_select( &self, options: ConfirmSelectOptions, ) -> Result<(), Error>

Trait Implementations§

Source§

impl Deref for RabbitMqChannel

Source§

type Target = Channel

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for RabbitMqChannel

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Drop for RabbitMqChannel

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T