pub struct AsyncConnection { /* private fields */ }Implementations§
Source§impl AsyncConnection
impl AsyncConnection
pub fn new( config: Arc<Config>, publisher_confirms: Confirmations, auto_ack: bool, prefetch_count: Option<u16>, ) -> Self
pub async fn publish( &self, exchange_name: &str, routing_key: &str, body: impl Into<Vec<u8>>, content_type: &str, content_encoding: ContentEncoding, command_timeout: Option<Duration>, delivery_mode: DeliveryMode, expiration: Option<u32>, ) -> Result<(), AppError>
pub async fn subscribe( &self, handler: Handler, routing_key: &str, exchange_name: &str, exchange_type: &str, queue_name: &str, process_timeout: Option<Duration>, timeout_duration: Option<Duration>, queue_options: QueueOptions, ) -> Result<(), AppError>
pub async fn rpc_server( &self, handler: RPCHandler, routing_key: &str, exchange_name: &str, exchange_type: &str, queue_name: &str, response_timeout: Option<Duration>, timeout_duration: Option<Duration>, queue_options: QueueOptions, ) -> Result<(), AppError>
pub async fn rpc_client( &self, exchange_name: &str, routing_key: &str, body: impl Into<Vec<u8>>, content_type: &str, content_encoding: ContentEncoding, response_timeout_millis: u32, command_timeout: Option<Duration>, delivery_mode: DeliveryMode, expiration: Option<u32>, ) -> Result<Vec<u8>, AppError>
pub async fn update_secret( &self, new_secret: &str, reason: &str, command_timeout: Option<Duration>, ) -> Result<(), AppError>
pub async fn close(&self) -> Result<(), Box<dyn Error>>
Trait Implementations§
Source§impl Clone for AsyncConnection
impl Clone for AsyncConnection
Source§fn clone(&self) -> AsyncConnection
fn clone(&self) -> AsyncConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AsyncConnection
impl RefUnwindSafe for AsyncConnection
impl Send for AsyncConnection
impl Sync for AsyncConnection
impl Unpin for AsyncConnection
impl UnsafeUnpin for AsyncConnection
impl UnwindSafe for AsyncConnection
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