pub trait RiQueue: Send + Sync {
// Required methods
fn create_producer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RiResult<Box<dyn RiQueueProducer>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_consumer<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = RiResult<Box<dyn RiQueueConsumer>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RiResult<RiQueueStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn purge<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RiResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RiResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Main queue trait defining queue operations.
This trait defines the core operations for queues, including creating producers and consumers, getting statistics, purging queues, and deleting queues.
Required Methods§
Sourcefn create_producer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RiResult<Box<dyn RiQueueProducer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_producer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RiResult<Box<dyn RiQueueProducer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new producer for this queue.
§Returns
A RiResult<Box<dyn RiQueueProducer>> containing the producer