pub struct Channel { /* private fields */ }
Expand description
Main entry point for most AMQP operations.
It serves as a lightweight connection and can be obtained from a
Connection
by calling Connection::create_channel
.
See also the RabbitMQ documentation on channels.
Implementations§
source§impl Channel
impl Channel
pub fn status(&self) -> &ChannelStatus
pub fn on_error<E: FnMut(Error) + Send + 'static>(&self, handler: E)
pub fn id(&self) -> ChannelId
pub async fn close(&self, reply_code: ReplyCode, reply_text: &str) -> Result<()>
pub async fn basic_consume( &self, queue: &str, consumer_tag: &str, options: BasicConsumeOptions, arguments: FieldTable ) -> Result<Consumer>
pub async fn basic_get( &self, queue: &str, options: BasicGetOptions ) -> Result<Option<BasicGetMessage>>
pub async fn exchange_declare( &self, exchange: &str, kind: ExchangeKind, options: ExchangeDeclareOptions, arguments: FieldTable ) -> Result<()>
pub async fn wait_for_confirms(&self) -> Result<Vec<BasicReturnMessage>>
source§impl Channel
impl Channel
pub async fn basic_qos( &self, prefetch_count: ShortUInt, options: BasicQosOptions ) -> Result<()>
pub async fn basic_cancel( &self, consumer_tag: &str, options: BasicCancelOptions ) -> Result<()>
pub async fn basic_publish( &self, exchange: &str, routing_key: &str, options: BasicPublishOptions, payload: &[u8], properties: BasicProperties ) -> Result<PublisherConfirm>
pub async fn basic_ack( &self, delivery_tag: LongLongUInt, options: BasicAckOptions ) -> Result<()>
pub async fn basic_reject( &self, delivery_tag: LongLongUInt, options: BasicRejectOptions ) -> Result<()>
pub async fn basic_recover_async( &self, options: BasicRecoverAsyncOptions ) -> Result<()>
pub async fn basic_recover(&self, options: BasicRecoverOptions) -> Result<()>
pub async fn basic_nack( &self, delivery_tag: LongLongUInt, options: BasicNackOptions ) -> Result<()>
pub async fn channel_flow(&self, options: ChannelFlowOptions) -> Result<Boolean>
pub async fn access_request( &self, realm: &str, options: AccessRequestOptions ) -> Result<()>
sourcepub async fn exchange_delete(
&self,
exchange: &str,
options: ExchangeDeleteOptions
) -> Result<()>
pub async fn exchange_delete( &self, exchange: &str, options: ExchangeDeleteOptions ) -> Result<()>
Delete an exchange
pub async fn exchange_bind( &self, destination: &str, source: &str, routing_key: &str, options: ExchangeBindOptions, arguments: FieldTable ) -> Result<()>
pub async fn exchange_unbind( &self, destination: &str, source: &str, routing_key: &str, options: ExchangeUnbindOptions, arguments: FieldTable ) -> Result<()>
pub async fn queue_declare( &self, queue: &str, options: QueueDeclareOptions, arguments: FieldTable ) -> Result<Queue>
pub async fn queue_bind( &self, queue: &str, exchange: &str, routing_key: &str, options: QueueBindOptions, arguments: FieldTable ) -> Result<()>
pub async fn queue_purge( &self, queue: &str, options: QueuePurgeOptions ) -> Result<MessageCount>
pub async fn queue_delete( &self, queue: &str, options: QueueDeleteOptions ) -> Result<MessageCount>
pub async fn queue_unbind( &self, queue: &str, exchange: &str, routing_key: &str, arguments: FieldTable ) -> Result<()>
pub async fn tx_select(&self) -> Result<()>
pub async fn tx_commit(&self) -> Result<()>
pub async fn tx_rollback(&self) -> Result<()>
pub async fn confirm_select(&self, options: ConfirmSelectOptions) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl !UnwindSafe for Channel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more