pub struct Connection(/* private fields */);
Expand description
A non-consuming ProducerBuilder and ConsumerBuilder builder.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn producer_builder(&self) -> ProducerBuilder
pub fn producer_builder(&self) -> ProducerBuilder
Build a non-consuming ProducerBuilder.
Sourcepub fn consumer_builder(&self) -> ConsumerBuilder
pub fn consumer_builder(&self) -> ConsumerBuilder
Build a non-consuming ConsumerBuilder.
Sourcepub async fn channel(&self) -> Result<Channel, Error>
pub async fn channel(&self) -> Result<Channel, Error>
channel creates a channel over the Connection
and returns the Future<Output = <lapin::Channel>>
.
Sourcepub async fn queue(
&self,
ex: &str,
queue: &str,
opts: QueueOptions,
) -> Result<(Channel, Queue), Error>
pub async fn queue( &self, ex: &str, queue: &str, opts: QueueOptions, ) -> Result<(Channel, Queue), Error>
queue creates a channel and a queue over the Connection
and returns the Future<Output = <lapin::Channel, lapin::Queue>>
.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a copy 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 Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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