pub struct TopicChannel<E> { /* private fields */ }Expand description
A Topic Channel associated with a TopicExchange.
Implementations§
Source§impl<E: TopicExchange> TopicChannel<E>
impl<E: TopicExchange> TopicChannel<E>
Sourcepub async fn new(connection: &Connection) -> Result<Self>
pub async fn new(connection: &Connection) -> Result<Self>
Create a new TopicChannel, declaring the Topic Exchange this channel is associated with.
Sourcepub async fn consumer<B: TopicBus>(
&self,
routing_key: ConsumerRoutingKey<B>,
consumer_tag: &str,
) -> Result<Consumer<B>>
pub async fn consumer<B: TopicBus>( &self, routing_key: ConsumerRoutingKey<B>, consumer_tag: &str, ) -> Result<Consumer<B>>
Create a new Consumer for the topic bus that consumes messages with routing keys matching the passed ConsumerRoutingKey.
Trait Implementations§
Source§impl<E: TopicExchange> Channel for TopicChannel<E>
impl<E: TopicExchange> Channel for TopicChannel<E>
Source§fn publish_with_properties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
payload_bytes: &'life1 [u8],
routing_key: &'life2 str,
properties: BasicProperties,
correlation_uuid: Uuid,
reply_uuid: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn publish_with_properties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
payload_bytes: &'life1 [u8],
routing_key: &'life2 str,
properties: BasicProperties,
correlation_uuid: Uuid,
reply_uuid: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Publish a message onto a queue
Source§impl<E: Clone> Clone for TopicChannel<E>
impl<E: Clone> Clone for TopicChannel<E>
Source§fn clone(&self) -> TopicChannel<E>
fn clone(&self) -> TopicChannel<E>
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<E> Freeze for TopicChannel<E>
impl<E> !RefUnwindSafe for TopicChannel<E>
impl<E> Send for TopicChannel<E>where
E: Send,
impl<E> Sync for TopicChannel<E>where
E: Sync,
impl<E> Unpin for TopicChannel<E>where
E: Unpin,
impl<E> !UnwindSafe for TopicChannel<E>
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